Skip to content

Skip checking free space on macOS during restore #97

Skip checking free space on macOS during restore

Skip checking free space on macOS during restore #97

name: Build Unstable
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
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_Unstable_Bundle.zip .
- uses: ncipollo/release-action@v1
with:
artifacts: "Open_Android_Backup_Unstable_Bundle.zip,companion_app/build/app/outputs/apk/release/app-release.apk"
allowUpdates: true
artifactErrorsFailBuild: true
generateReleaseNotes: true
prerelease: true
tag: "latest" # we need to keep this tag for legacy scripts to work (and as a fallback)
name: "Open Android Backup - Unstable Version"
body: "This is an unstable version of Open Android Backup, containing the latest updates which have not yet been tested thoroughly. Use at your own risk."