Skip to content

Bump version

Bump version #17

Workflow file for this run

name: Build Tagged
on:
push:
tags:
- "v*"
jobs:
build:
name: "Tagged Release"
runs-on: "ubuntu-latest"
env:
working-directory: ./companion_app
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v2
with:
channel: 'stable' # or: 'beta', 'dev' or 'master'
- run: flutter pub get
working-directory: ${{ env.working-directory }}
- name: Setup keystore
# TODO: Don't hardcode the keystore location (/home/runner/...)
run: |
mkdir -p /home/runner/.android
echo ${{ secrets.ANDROID_BUILD_KEYSTORE_BASE64 }} | base64 --decode > /home/runner/.android/release.keystore
echo keyPassword=\${{ secrets.ANDROID_BUILD_KEY_PASSWORD }} > ${{ env.working-directory }}/android/key.properties
echo storePassword=\${{ secrets.ANDROID_BUILD_STORE_PASSWORD }} >> ${{ env.working-directory }}/android/key.properties
echo keyAlias=\${{ secrets.ANDROID_BUILD_KEY_ALIAS }} >> ${{ env.working-directory }}/android/key.properties
echo storeFile=/home/runner/.android/release.keystore >> ${{ env.working-directory }}/android/key.properties
- run: flutter build apk --release
working-directory: ${{ env.working-directory }}
- name: Delete keystore and other secrets
run: |
rm -rf /home/runner/.android
rm -rf ${{ env.working-directory }}/android/key.properties
- run: cp -v companion_app/build/app/outputs/apk/release/app-release.apk ./open-android-backup-companion.apk
- run: sudo apt update && sudo apt install p7zip-full
- run: 7z a -bb3 -tzip -mx9 -x!.*\* -x!website\* -x!companion_app\* -x!convenience-scripts\* Open_Android_Backup_${{ github.ref_name }}_Bundle.zip .
- uses: ncipollo/release-action@v1
with:
artifacts: "Open_Android_Backup_${{ github.ref_name }}_Bundle.zip,companion_app/build/app/outputs/apk/release/app-release.apk"
allowUpdates: false
artifactErrorsFailBuild: true
generateReleaseNotes: true
prerelease: false
makeLatest: true
name: "Open Android Backup Stable - ${{ github.ref_name }}"
discussionCategory: "New Versions"