Skip to content

add actions for automatically publishing apk on github #4

add actions for automatically publishing apk on github

add actions for automatically publishing apk on github #4

name: Flutter Release Workflow
on:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set Up Java
uses: actions/[email protected]
with:
distribution: "oracle"
java-version: "17"
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.24.1"
channel: "stable"
- name: Install dependencies
run: flutter pub get
# - name: Run tests
# run: flutter test
- name: Build APK
run: flutter build apk --release
- name: Upload APK
uses: actions/upload-artifact@v2
with:
name: release-apk
path: build/app/outputs/flutter-apk/app-release.apk
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Generate Release Notes
id: generate_release_notes
uses: release-drafter/release-drafter@v5
with:
config-name: release-drafter.yml
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: build/app/outputs/flutter-apk/app-release.apk
token: ${{ secrets.GITHUB_TOKEN }}
name: Release ${{ github.ref }}
tag: ${{ github.ref }}
# body: ${{ steps.generate_release_notes.outputs.notes }}