generated from ExpTechTW/Example
-
-
Notifications
You must be signed in to change notification settings - Fork 13
81 lines (66 loc) · 1.94 KB
/
github_actions.yml
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
name: DPIP
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build-app:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "17"
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Flutter get
run: flutter pub get --no-example
- name: Prebuild
run: dart run build_runner build --delete-conflicting-outputs
- name: Build Android application (apk, aab)
if: matrix.platform == 'ubuntu-latest'
run: |
flutter build apk --debug
flutter build aab --debug
- name: Build iOS application (app)
if: matrix.platform == 'macos-latest'
run: flutter build ios --debug --no-codesign
- name: Package IPA
if: matrix.platform == 'macos-latest'
run: |
mkdir -p Payload
cp -R build/ios/iphoneos/Runner.app Payload/Runner.app
zip -r DPIP.ipa Payload
- name: Upload (apk)
if: matrix.platform == 'ubuntu-latest'
uses: actions/upload-artifact@master
with:
name: "DPIP.apk"
path: build/app/outputs/flutter-apk/*.apk
- name: Upload (aab)
if: matrix.platform == 'ubuntu-latest'
uses: actions/upload-artifact@master
with:
name: "DPIP.aab"
path: build/app/outputs/bundle/release/*.aab
- name: Upload (app)
if: matrix.platform == 'macos-latest'
uses: actions/upload-artifact@master
with:
name: "DPIP.app"
path: /Users/runner/work/DPIP/DPIP/build/ios/iphoneos/Runner.app
- name: Upload (ipa)
if: matrix.platform == 'macos-latest'
uses: actions/upload-artifact@master
with:
name: "DPIP.ipa"
path: DPIP.ipa