Skip to content

Commit 52defaf

Browse files
committed
fix: make workflow use dynamic version from package.json
1 parent b7fe58e commit 52defaf

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/android-release.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,15 @@ jobs:
7070

7171
- name: Rename APK
7272
run: |
73+
VERSION=$(node -p "require('./package.json').version")
7374
ls -R android/app/build/outputs/apk/release
74-
cp android/app/build/outputs/apk/release/*-signed.apk paperknife-v1.0.0.apk
75+
cp android/app/build/outputs/apk/release/*-signed.apk "paperknife-v${VERSION}.apk"
76+
echo "APP_VERSION=${VERSION}" >> $GITHUB_ENV
7577
7678
- name: Upload Signed APK
7779
uses: actions/upload-artifact@v4
7880
with:
79-
name: PaperKnife-Android-v1.0.0
80-
path: paperknife-v1.0.0.apk
81+
name: PaperKnife-Android-v${{ env.APP_VERSION }}
82+
path: paperknife-v${{ env.APP_VERSION }}.apk
8183
if-no-files-found: error
8284
compression-level: 0

0 commit comments

Comments
 (0)