Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

Commit e6ef3d0

Browse files
authored
fix: android beta builds (#145)
1 parent 39ed788 commit e6ef3d0

File tree

4 files changed

+34
-8
lines changed

4 files changed

+34
-8
lines changed

.github/workflows/android-beta.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: DIDPay Android Beta
1+
name: Android Beta
22

33
on:
44
schedule:
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
android-beta:
10-
name: Android build signed app bundle
10+
name: Android build beta
1111
runs-on: ubuntu-latest
1212

1313
steps:
@@ -28,7 +28,7 @@ jobs:
2828

2929
- name: Create didpay.keystore and key.properties file
3030
run: |
31-
run: echo "${{ secrets.BETA_ANDROID_KEY_STORE }}" | base64 --decode > android/app/didpay.keystore
31+
echo "${{ secrets.BETA_ANDROID_KEY_STORE }}" | base64 --decode > android/app/didpay.keystore
3232
echo "storePassword=${{ secrets.BETA_ANDROID_KEYSTORE_PASSWORD }}" >> android/key.properties
3333
echo "keyPassword=${{ secrets.BETA_ANDROID_KEYSTORE_PASSWORD }}" >> android/key.properties
3434
echo "keyAlias=didpay" >> android/key.properties
@@ -47,11 +47,28 @@ jobs:
4747
echo "Version Name: $VERSION_NAME"
4848
echo "::set-output name=version_name::$VERSION_NAME"
4949
50+
- name: Create tags
51+
run: |
52+
TAG_NAME="android-beta-${{ steps.versioning.outputs.version_name }}"
53+
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
54+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
55+
git config --global user.name "github-actions[bot]"
56+
git tag -a $TAG_NAME -m "Release $TAG_NAME"
57+
git push origin $TAG_NAME
58+
5059
- name: Build appbundle
51-
run: just build-app-bundle
60+
run: just android-apk
5261

5362
- name: Upload build artifact
5463
uses: actions/upload-artifact@v3
5564
with:
5665
name: android-beta
57-
path: build/app/outputs/bundle/release/app-release.aab
66+
path: build/app/outputs/flutter-apk/app-release.apk
67+
68+
- name: Create Github Release
69+
uses: softprops/action-gh-release@v1
70+
with:
71+
generate_release_notes: true
72+
prerelease: true
73+
files: build/app/outputs/flutter-apk/app-release.apk
74+
tag_name: ${{ env.TAG_NAME }}

.vscode/settings.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,11 @@
1111
},
1212
"[markdown]": {
1313
"editor.defaultFormatter": "esbenp.prettier-vscode"
14-
}
14+
},
15+
"terminal.integrated.env.osx": {
16+
"ACTIVE_HERMIT": null,
17+
"HERMIT_ENV": null,
18+
"HERMIT_ENV_OPS": null,
19+
"HERMIT_BIN": null
20+
},
1521
}

Justfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,7 @@ set-build-number:
8181
# Build android app bundle
8282
android-app-bundle:
8383
flutter build appbundle
84+
85+
# Build android apk
86+
android-apk:
87+
flutter build apk --release

android/app/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,10 @@ android {
6161
release {
6262
keyAlias keyProperties['keyAlias']
6363
keyPassword keyProperties['keyPassword']
64-
storeFile file(keyProperties['storeFile'])
64+
storeFile keyProperties['storeFile'] ? file(keyProperties['storeFile']) : null
6565
storePassword keyProperties['storePassword']
6666
}
6767
}
68-
6968
buildTypes {
7069
release {
7170
signingConfig signingConfigs.release

0 commit comments

Comments
 (0)