Skip to content

Commit

Permalink
add actions for automatically publishing apk on github
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr-Blank committed Aug 23, 2024
1 parent 526e72c commit ddadc04
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/release-drafter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name-template: 'v$NEXT_PATCH_VERSION'
tag-template: 'v$NEXT_PATCH_VERSION'
categories:
- title: '🚀 New Features'
labels:
- 'feature'
- title: '🐛 Bug Fixes'
labels:
- 'bug'
- title: '🛠 Maintenance'
labels:
- 'maintenance'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
template: |
## What's Changed
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...$NEW_TAG
64 changes: 64 additions & 0 deletions .github/workflows/flutter_release.yaml
Original file line number Diff line number Diff line change
@@ -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/[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 }}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 0.1.0+1
version: 0.0.1+1

environment:
sdk: ">=3.3.4 <4.0.0"
Expand Down

0 comments on commit ddadc04

Please sign in to comment.