Imports centralized #1
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: Build Release - APK and AAB | |
on: | |
push: | |
branches: [ master ] | |
env: | |
APP_VERSION: v2.0.${{github.run_number}} | |
jobs: | |
build: | |
name: Build APK and AAB | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v1 | |
with: | |
channel: stable | |
flutter-version: '3.13.2' | |
- name: Get dependencies | |
run: flutter pub get | |
- name: Analyze code | |
run: flutter analyze | |
- name: Build APK | |
run: flutter build apk --release | |
- name: Build AAB | |
run: flutter build appbundle --release | |
- name: Tag version | |
run: git tag $APP_VERSION | |
- name: Push tag | |
uses: ncipollo/release-action@v1 | |
with: | |
token: ${{ secrets.TOKEN }} | |
artifacts: "build/app/outputs/apk/release/*, build/app/outputs/bundle/release/*" | |
tag: MyMuster_v1.1.${{github.run_number}} | |
prerelease: false | |
- name: Upload APK artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: release-apk | |
path: build/app/outputs/apk/release/*.apk | |
- name: Upload AAB artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: release-aab | |
path: build/app/outputs/bundle/release/*.aab |