-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add GitHub Actions workflow for building and releasing APK
- Loading branch information
1 parent
c5fc429
commit 287542f
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Build and Release APK | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: '3.27.3' | ||
cache: true | ||
|
||
- name: Install Dependencies | ||
run: flutter pub get | ||
|
||
- name: Build APK | ||
run: flutter build apk --release | ||
|
||
- name: Upload APK to Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: release-apk | ||
path: build/app/outputs/flutter-apk/app-release.apk | ||
|
||
release: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Download apk | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: release-apk | ||
path: build/ | ||
|
||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: v1.${{ github.run_number }} | ||
name: Release v1.${{ github.run_number }} | ||
body: "New Android APK release." | ||
files: build/app-release.apk | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |