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: Flutter Build and Release | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Run tests | |
run: flutter test | |
- name: Build Android APK | |
if: matrix.os == 'ubuntu-latest' | |
run: flutter build apk | |
- name: Build Android App Bundle | |
if: matrix.os == 'ubuntu-latest' | |
run: flutter build appbundle | |
- name: Build Web | |
if: matrix.os == 'ubuntu-latest' | |
run: flutter build web | |
- name: Build Windows | |
if: matrix.os == 'windows-latest' | |
run: flutter build windows | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
build/app/outputs/flutter-apk/app-release.apk | |
build/app/outputs/bundle/release/app-release.aab | |
build/web/**/* | |
build/windows/runner/Release/*.exe | |
env: | |
GITHUB_TOKEN: ${{ secrets.GHP }} |