Skip to content

Commit 5f962f4

Browse files
committed
Create GitHub workflow to release APK
Related to #90
1 parent 5badb3c commit 5f962f4

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

.github/workflows/build-mobile.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
default: android
1111
options:
1212
- android
13+
- android-release-apk
1314
- ios-registered-devices
1415
- ios-testflight
1516

@@ -39,3 +40,31 @@ jobs:
3940
if: ${{ github.event.inputs.platform == 'ios-testflight' }}
4041
working-directory: apps/mobile-wallet
4142
run: eas build --platform=ios --profile=production --non-interactive --wait --auto-submit
43+
44+
- name: 🤖 Build and submit Android release APK
45+
if: ${{ github.event.inputs.platform == 'android-release-apk' }}
46+
working-directory: apps/mobile-wallet
47+
run: eas build --platform=android --profile=release-apk --non-interactive --wait --local --output=app-release.apk
48+
49+
- name: Create Release
50+
if: ${{ github.event.inputs.platform == 'android-release-apk' }}
51+
id: create_release
52+
uses: actions/create-release@v1
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
with:
56+
tag_name: ${{ github.ref_name }}
57+
release_name: ${{ github.ref_name }}
58+
draft: true
59+
prerelease: false
60+
61+
- name: Upload APK asset
62+
if: ${{ github.event.inputs.platform == 'android-release-apk' }}
63+
uses: actions/upload-release-asset@v1
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
with:
67+
upload_url: ${{ steps.create_release.outputs.upload_url }}
68+
asset_path: app-release.apk
69+
asset_name: app-release.apk
70+
asset_content_type: application/vnd.android.package-archive

apps/mobile-wallet/eas.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414
"internal": {
1515
"extends": "production",
1616
"distribution": "internal"
17+
},
18+
"release-apk": {
19+
"extends": "production",
20+
"autoIncrement": false,
21+
"android": {
22+
"buildType": "apk"
23+
}
1724
}
1825
},
1926
"submit": {

0 commit comments

Comments
 (0)