Unbump version #65
Workflow file for this run
This file contains hidden or 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: Build releases | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - '*' | |
| jobs: | |
| build: | |
| env: | |
| PUB_CACHE: ${{ github.workspace }}/.pub-cache | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Clone repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| cache: true | |
| flutter-version: 3.35.7 | |
| # optional parameters follow | |
| cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache | |
| cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path | |
| pub-cache-key: "flutter-pub:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache of dart pub get dependencies | |
| pub-cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path | |
| - run: flutter --version | |
| - name: Setup Java | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - run: flutter doctor | |
| - name: Setup keystore | |
| run: | | |
| echo "${{ secrets.SIGNING_KEY }}" | base64 -d > android/android.keystore | |
| echo "storePassword=${{ secrets.KEY_STORE_PASSWORD }}" > android/key.properties | |
| echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties | |
| echo "keyAlias=${{ secrets.ALIAS }}" >> android/key.properties | |
| echo "storeFile=../android.keystore" >> android/key.properties | |
| - run: flutter build apk | |
| - name: Rename apk | |
| id: rename_apk | |
| run: | | |
| apkName="ShockAlarm.apk" | |
| echo "apkName=$apkName" >> $GITHUB_OUTPUT | |
| mkdir -p output | |
| mv build/app/outputs/flutter-apk/app-release.apk output/$apkName | |
| - name: Upload apk to release | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.TOKEN }} | |
| file: output/${{ steps.rename_apk.outputs.apkName }} | |
| asset_name: ShockAlarm_Android_${{ github.ref }}.apk | |
| tag: ${{ github.ref }} | |
| overwrite: true | |
| - run: sudo apt update && sudo apt install ninja-build libgtk-3-dev | |
| - run: flutter build linux | |
| - name: Compress binary | |
| run: | | |
| cp web/icons/Icon-512.png build/linux/x64/release/bundle/data/flutter_assets/icon.png | |
| cd build/linux/x64/release/bundle | |
| tar -czvf shock_alarm_linux_x64.tar.gz * | |
| cd ../../../../../ | |
| - name: Upload linux binaries to release | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.TOKEN }} | |
| file: build/linux/x64/release/bundle/shock_alarm_linux_x64.tar.gz | |
| asset_name: shock_alarm_linux_x64_${{ github.ref }}.tar.gz | |
| tag: ${{ github.ref }} | |
| overwrite: true | |
| - run: bash generate_pkgbuild.sh | |
| - name: Publish AUR package | |
| uses: KSXGitHub/github-actions-deploy-aur@v3 | |
| with: | |
| pkgname: shock-alarm | |
| pkgbuild: ./PKGBUILD | |
| commit_username: ${{ secrets.AUR_USERNAME }} | |
| commit_email: ${{ secrets.AUR_EMAIL }} | |
| ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} | |
| commit_message: Update AUR package | |
| ssh_keyscan_types: rsa,ecdsa,ed25519 |