WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 07d2e39

Browse files
committed
build: fix release workflow
1 parent 58c36de commit 07d2e39

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

.github/workflows/release.yml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
tags:
66
- "v*.*.*"
77

8+
# additional permissions for provided GitHub token to create new release
9+
permissions:
10+
contents: write
11+
812
jobs:
913
build-release-win-bundle:
1014
runs-on: windows-latest
@@ -14,13 +18,13 @@ jobs:
1418
- name: Set up JDK
1519
uses: oracle-actions/setup-java@v1
1620
with:
17-
release: 21
21+
release: 23
1822

1923
- name: Set jadx version
2024
uses: actions/github-script@v7
2125
with:
2226
script: |
23-
const jadxVersion = github.event.release.tag_name
27+
const jadxVersion = context.ref.split('/').pop()
2428
core.exportVariable('JADX_VERSION', jadxVersion);
2529
2630
- name: Setup Gradle
@@ -35,9 +39,10 @@ jobs:
3539
name: ${{ format('jadx-gui-{0}-with-jre-win', env.JADX_VERSION) }}
3640
path: ${{ format('build/distWinWithJre/jadx-gui-{0}-with-jre-win.zip', env.JADX_VERSION) }}
3741
if-no-files-found: error
38-
retention-days: 14
42+
retention-days: 1
3943

4044
release:
45+
needs: build-release-win-bundle
4146
runs-on: ubuntu-latest
4247
steps:
4348
- uses: actions/checkout@v4
@@ -52,7 +57,7 @@ jobs:
5257
uses: actions/github-script@v7
5358
with:
5459
script: |
55-
const jadxVersion = github.event.release.tag_name
60+
const jadxVersion = context.ref.split('/').pop()
5661
const releaseName = jadxVersion.substring(1)
5762
5863
core.exportVariable('JADX_VERSION', jadxVersion);
@@ -66,18 +71,25 @@ jobs:
6671
env:
6772
JADX_BUILD_JAVA_VERSION: 11
6873

69-
# download Windows JRE bundle
70-
- uses: actions/download-artifact@v4
74+
- name: Download Windows JRE bundle
75+
uses: actions/download-artifact@v4
7176
with:
7277
name: ${{ format('jadx-gui-{0}-with-jre-win', env.JADX_VERSION) }}
73-
path: ${{ format('build/jadx-gui-{0}-with-jre-win.zip', env.JADX_VERSION) }}
78+
path: ${{ format('build/jadx-gui-{0}-with-jre-win', env.JADX_VERSION) }}
79+
80+
- run: |
81+
cd build
82+
pwd
83+
ls -l
84+
ls jadx-gui-*-with-jre-win
85+
mv jadx-gui-*-with-jre-win/jadx-gui-*-with-jre-win.zip .
86+
mv distWin/jadx-gui-*-win.zip .
87+
ls -l *.zip
7488
7589
- name: Release
7690
uses: softprops/action-gh-release@v2
7791
with:
78-
name: ${{ env.JADX_RELEASE_NAME) }}
92+
name: ${{ env.JADX_RELEASE_NAME }}
7993
draft: true
80-
files: |
81-
${{ format('build/jadx-{0}.zip', env.JADX_VERSION) }}
82-
${{ format('build/distWin/jadx-gui-{0}-win.zip', env.JADX_VERSION) }}
83-
${{ format('build/jadx-gui-{0}-with-jre-win.zip', env.JADX_VERSION) }}
94+
fail_on_unmatched_files: true
95+
files: build/jadx-*.zip

0 commit comments

Comments
 (0)