Skip to content

Commit

Permalink
add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
2shrestha22 committed Jul 7, 2024
1 parent 1dc4076 commit 854a5a9
Showing 1 changed file with 78 additions and 0 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Build and Release

on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Clone Repository
uses: actions/checkout@v4

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version-file: pubspec.yaml

- run: flutter --version

- name: Install Dependencies
run: flutter pub get

- name: Run Build Runner
run: dart run build_runner build -d

- name: Build App Bundle
run: flutter build appbundle --build-number ${{ github.run_id }

- name: Build Split APK
run: flutter build apk --split-per-abi --build-number ${{ github.run_id }

- name: Upload Artifacts - APK
uses: actions/upload-artifact@v4
with:
name: android-apks
path: build/app/outputs/flutter-apk/*.apk

- name: Upload Artifacts - App Bundle
uses: actions/upload-artifact@v4
with:
name: android-appbundle
path: build/app/outputs/bundle/release/*.aab

release:
needs: build
runs-on: ubuntu-latest

steps:
- name: Clone Repository
uses: actions/checkout@v4

- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: android-apks

- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "*.apk"

# WIP
# play-store:
# needs: build
# runs-on: ubuntu-latest

# steps:
# - name: Clone Repository
# uses: actions/checkout@v4

# - name: Download Artifacts
# uses: actions/download-artifact@v4
# with:
# name: android-appbundle

0 comments on commit 854a5a9

Please sign in to comment.