fixing release workflow #12
Workflow file for this run
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: Release Workflow | |
on: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
jobs: | |
build-release-files: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- run: mkdir android/keystore | |
- name: Decode Keystore | |
id: decode_keystore | |
uses: timheuer/base64-to-file@v1 | |
with: | |
fileName: 'keystore.jks' | |
fileDir: 'android/keystore/' | |
encodedString: ${{ secrets.KEYSTORE }} | |
- name: Install Java | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'zulu' | |
java-version: '11' | |
- name: Install Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.13.4' | |
channel: 'stable' | |
- run: flutter --version | |
- run: flutter pub get | |
- run: flutter packages pub run build_runner build --delete-conflicting-outputs | |
# - run: flutter test | |
- name: Build AAR | |
env: | |
ALIAS: ${{ secrets.KEY_ALIAS }} | |
PASS: ${{ secrets.KEY_PASS }} | |
run: flutter build appbundle --release | |
- run: flutter build apk --release | |
env: | |
ALIAS: ${{ secrets.KEY_ALIAS }} | |
PASS: ${{ secrets.KEY_PASS }} | |
- run: flutter build web --release | |
- run: zip pwa.zip build/web | |
- run: flutter build macos --release | |
- run: zip macos.zip build/macos/Build/Products/Release/Ambush\ Invoice\ Generator.app | |
- name: Archive Files | |
uses: actions/upload-artifact@v2 | |
with: | |
name: release-artifacts | |
path: | | |
build/app/outputs/apk/release/app-release.apk | |
build/app/outputs/bundle/release/app-release.aab | |
pwa.zip | |
macos.zip | |
release: | |
needs: build-release-files | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Download Artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
name: release-artifacts | |
path: ./downloaded-artifacts | |
- name: Release | |
uses: docker://antonyurchenko/git-release:v5 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
args: | | |
./downloaded-artifacts/app-release.apk | |
./downloaded-artifacts/app-release.aab | |
./downloaded-artifacts/pwa.zip | |
./downloaded-artifacts/macos.zip |