Skip to content

Commit

Permalink
fix: android beta builds
Browse files Browse the repository at this point in the history
  • Loading branch information
wesbillman committed May 3, 2024
1 parent 180801f commit 0b3c7fa
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 8 deletions.
27 changes: 22 additions & 5 deletions .github/workflows/android-beta.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: DIDPay Android Beta
name: Android Beta

on:
schedule:
Expand All @@ -7,7 +7,7 @@ on:

jobs:
android-beta:
name: Android build signed app bundle
name: Android build beta
runs-on: ubuntu-latest

steps:
Expand All @@ -28,7 +28,7 @@ jobs:

- name: Create didpay.keystore and key.properties file
run: |
run: echo "${{ secrets.BETA_ANDROID_KEY_STORE }}" | base64 --decode > android/app/didpay.keystore
echo "${{ secrets.BETA_ANDROID_KEY_STORE }}" | base64 --decode > android/app/didpay.keystore
echo "storePassword=${{ secrets.BETA_ANDROID_KEYSTORE_PASSWORD }}" >> android/key.properties
echo "keyPassword=${{ secrets.BETA_ANDROID_KEYSTORE_PASSWORD }}" >> android/key.properties
echo "keyAlias=didpay" >> android/key.properties
Expand All @@ -47,11 +47,28 @@ jobs:
echo "Version Name: $VERSION_NAME"
echo "::set-output name=version_name::$VERSION_NAME"
- name: Create tags
run: |
TAG_NAME="android-beta-${{ steps.versioning.outputs.version_name }}"
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git tag -a $TAG_NAME -m "Release $TAG_NAME"
git push origin $TAG_NAME
- name: Build appbundle
run: just build-app-bundle
run: just android-apk

- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: android-beta
path: build/app/outputs/bundle/release/app-release.aab
path: build/app/outputs/flutter-apk/app-release.apk

- name: Create Github Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
prerelease: true
files: build/app/outputs/flutter-apk/app-release.apk
tag_name: ${{ env.TAG_NAME }}
8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,11 @@
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
},
"terminal.integrated.env.osx": {
"ACTIVE_HERMIT": null,
"HERMIT_ENV": null,
"HERMIT_ENV_OPS": null,
"HERMIT_BIN": null
},
}
4 changes: 4 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,7 @@ set-build-number:
# Build android app bundle
android-app-bundle:
flutter build appbundle

# Build android apk
android-apk:
flutter build apk --release
3 changes: 1 addition & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,10 @@ android {
release {
keyAlias keyProperties['keyAlias']
keyPassword keyProperties['keyPassword']
storeFile file(keyProperties['storeFile'])
storeFile keyProperties['storeFile'] ? file(keyProperties['storeFile']) : null
storePassword keyProperties['storePassword']
}
}

buildTypes {
release {
signingConfig signingConfigs.release
Expand Down

0 comments on commit 0b3c7fa

Please sign in to comment.