This repository has been archived by the owner on Dec 12, 2024. It is now read-only.
Android Beta #216
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Android Beta | |
on: | |
schedule: | |
- cron: "0 8 * * *" # 8 AM UTC | |
workflow_dispatch: | |
jobs: | |
android-beta: | |
name: Android build beta | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v2 | |
with: | |
distribution: "zulu" | |
java-version: "17" | |
- name: Init Hermit | |
uses: cashapp/activate-hermit@v1 | |
with: | |
cache: true | |
- name: Install dependencies | |
run: just get | |
- name: Create didpay.keystore and key.properties file | |
run: | | |
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 | |
echo "storeFile=didpay.keystore" >> android/key.properties | |
- name: Setup cider for versioning | |
run: | | |
flutter pub global activate cider | |
echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH | |
- name: Version the build | |
id: versioning | |
run: | | |
just set-build-number | |
VERSION_NAME=$(cider version) | |
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 android-apk | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: android-beta | |
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 }} |