Skip to content

Commit

Permalink
feat: add GitHub Actions workflow for building and releasing APK
Browse files Browse the repository at this point in the history
  • Loading branch information
bhaskaraa45 committed Mar 4, 2025
1 parent c5fc429 commit 287542f
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/build-release.yaml
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 }}

0 comments on commit 287542f

Please sign in to comment.