-
Notifications
You must be signed in to change notification settings - Fork 4
122 lines (101 loc) · 3.04 KB
/
build.yml
File metadata and controls
122 lines (101 loc) · 3.04 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: Build
on:
push:
branches:
- main
- develop
tags:
- '[0-9]+.[0-9]+.[0-9]+'
pull_request:
types: [opened, synchronize, reopened]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup environment
uses: ./.github/actions/setup
- name: Run app tests
shell: bash
run: |
cd app
flutter test
- name: Run ouds_core tests
shell: bash
run: |
cd ouds_core
flutter test
- name: Run ouds_global_raw_tokens tests
shell: bash
run: |
cd ouds_global_raw_tokens
flutter test
- name: Run ouds_theme_contract tests
shell: bash
run: |
cd ouds_theme_contract
flutter test
- name: Run ouds_theme_orange tests
shell: bash
run: |
cd ouds_theme_orange
flutter test
- name: Run ouds_theme_sosh tests
shell: bash
run: |
cd ouds_theme_sosh
flutter test
build-android:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup environment
uses: ./.github/actions/setup
- name: Determine build flavor
id: determine_flavor
run: echo "::set-output name=flavor::$(if [[ ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }} ]]; then echo "prod"; else echo "beta"; fi)"
- name: Build Android app
shell: bash
run: |
cd app
flutter build apk --flavor=${{ steps.determine_flavor.outputs.flavor }}
flutter build appbundle --flavor=${{ steps.determine_flavor.outputs.flavor }}
- name: Store Android app artifacts
uses: actions/upload-artifact@v4
with:
name: android-app
path: |
app/build/app/outputs/flutter-apk/*.apk
app/build/app/outputs/bundle/*/*.aab
build-ios:
runs-on: macos-15
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Xcode 16.4.0
run: sudo xcode-select -s /Applications/Xcode_16.4.0.app/Contents/Developer
- name: Setup environment
uses: ./.github/actions/setup
- name: Determine build flavor
id: determine_flavor
run: echo "::set-output name=flavor::$(if [[ ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }} ]]; then echo "prod"; else echo "beta"; fi)"
- name: Build iOS app
shell: bash
run: |
cd app
flutter build ios --no-codesign --flavor=${{ steps.determine_flavor.outputs.flavor }}
- name: Store iOS app artifacts
uses: actions/upload-artifact@v4
with:
name: ios-app
path: app/build/ios/iphoneos/Runner.app