Fixing router #26
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@v4 | |
- 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@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Install Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.24.2' | |
channel: 'stable' | |
- run: flutter --version | |
- run: flutter pub get | |
- run: flutter packages pub run build_runner build --delete-conflicting-outputs | |
- run: flutter build web --release | |
- run: zip -r pwa.zip build/web | |
- run: flutter build macos --release | |
- name: Move files to root | |
run: | | |
mv build/macos/Build/Products/Release/Ambush\ Invoice\ Generator.app Invoice.app | |
- name: Zip macos.app | |
run: zip -r macos.zip Invoice.app | |
- name: Archive Files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: release-artifacts | |
path: | | |
pwa.zip | |
macos.zip | |
release: | |
needs: build-release-files | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: release-artifacts | |
path: ./ | |
- name: Unzip pwa.zip | |
run: unzip pwa.zip | |
- name: 🎯 Deploy to firebase | |
uses: FirebaseExtended/action-hosting-deploy@v0 | |
with: | |
repoToken: ${{ secrets.GITHUB_TOKEN }} | |
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_INVOICES_APP_C2491 }} | |
projectId: invoices-app-c2491 | |
channelId: live | |
- name: Create Git Release | |
uses: docker://antonyurchenko/git-release:v6 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
args: | | |
./pwa.zip | |
./macos.zip |