mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-27 13:29:31 +00:00
add actions for automatically publishing apk on github
This commit is contained in:
parent
526e72c0c3
commit
ddadc04f0d
3 changed files with 84 additions and 1 deletions
64
.github/workflows/flutter_release.yaml
vendored
Normal file
64
.github/workflows/flutter_release.yaml
vendored
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
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/setup-java@v3.12.0
|
||||
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 }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue