-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflutter-app.yml
More file actions
90 lines (74 loc) · 2.16 KB
/
flutter-app.yml
File metadata and controls
90 lines (74 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Example workflow for Flutter applications (Android/iOS)
# Copy this file to your project's .github/workflows/release.yml
name: Release
on:
push:
branches:
- 'release/**'
- 'hotfix/**'
pull_request:
types: [closed]
branches: [main]
jobs:
release:
uses: banua-coder/banua-coder-workflow/.github/workflows/release.yml@v1
with:
project-type: flutter-app
main-branch: main
develop-branch: develop
changelog-format: keepachangelog
flutter-version: '3.27.2'
auto-merge-backport: false
secrets: inherit
# Build and deploy when tag is pushed
build-android:
if: startsWith(github.ref, 'refs/tags/')
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.27.2'
channel: stable
cache: true
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Get dependencies
run: flutter pub get
- name: Build APK
run: flutter build apk --release
- name: Build App Bundle
run: flutter build appbundle --release
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: android-apk
path: build/app/outputs/flutter-apk/app-release.apk
- name: Upload AAB
uses: actions/upload-artifact@v4
with:
name: android-aab
path: build/app/outputs/bundle/release/app-release.aab
build-ios:
if: startsWith(github.ref, 'refs/tags/')
needs: release
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.27.2'
channel: stable
cache: true
- name: Get dependencies
run: flutter pub get
- name: Build iOS (no codesign)
run: flutter build ios --release --no-codesign
# Add your iOS signing and deployment steps here
# For example, using fastlane or manual signing