Skip to content

Commit 1cf24a3

Browse files
committed
update github workflow
1 parent c6d1a07 commit 1cf24a3

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

.github/workflows/release-apk.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
release:
55
types: [published]
66

7+
permissions:
8+
contents: write
9+
710
jobs:
811
build:
912
runs-on: ubuntu-latest
@@ -36,6 +39,16 @@ jobs:
3639
- name: Setup Android SDK
3740
uses: android-actions/setup-android@v3
3841

42+
- name: Cache Gradle packages
43+
uses: actions/cache@v4
44+
with:
45+
path: |
46+
~/.gradle/caches
47+
~/.gradle/wrapper
48+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
49+
restore-keys: |
50+
${{ runner.os }}-gradle-
51+
3952
- name: Create local.properties
4053
run: |
4154
echo "keystore.file=/tmp/keystore.jks" > android/local.properties
@@ -65,11 +78,6 @@ jobs:
6578
mv app-release.apk muajjin-${{ steps.get_version.outputs.VERSION }}.apk
6679
6780
- name: Upload Release Asset
68-
uses: actions/upload-release-asset@v1
69-
env:
70-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81+
uses: softprops/action-gh-release@v2
7182
with:
72-
upload_url: ${{ github.event.release.upload_url }}
73-
asset_path: ./android/app/build/outputs/apk/release/muajjin-${{ steps.get_version.outputs.VERSION }}.apk
74-
asset_name: muajjin-${{ steps.get_version.outputs.VERSION }}.apk
75-
asset_content_type: application/vnd.android.package-archive
83+
files: ./android/app/build/outputs/apk/release/muajjin-${{ steps.get_version.outputs.VERSION }}.apk

0 commit comments

Comments
 (0)