-
Notifications
You must be signed in to change notification settings - Fork 1
156 lines (136 loc) · 5.24 KB
/
develop.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
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: Develop Branch Commit
on:
push:
branches: [ 'develop' ]
workflow_dispatch:
inputs:
ios-runner-type:
type: choice
required: true
description: "Runner type"
default: "self-hosted"
options:
- "self-hosted"
- "macos-13"
env:
BUILD_TYPE: 'SNAPSHOT' # Allowed values: 'SNAPSHOT', 'RELEASE', 'RELEASE_CANDIDATE'
FLUTTER_VERSION: '3.19.0'
XCODE_VERSION: '15.4'
JAVA_VERSION: '17'
RUBY_VERSION: '3.1'
HOST_NAME: ${{ secrets.HOST_NAME }}
PRIVATE_REPOSITORY_API_KEY: ${{ secrets.PRIVATE_REPOSITORY_API_KEY }}
PRIVATE_DART_REPOSITORY_URL: ${{ secrets.PRIVATE_DART_REPOSITORY_URL }}
PRIVATE_NATIVE_IOS_REPOSITORY_URL: ${{ secrets.PRIVATE_NATIVE_IOS_REPOSITORY_URL }}
PRIVATE_NATIVE_IOS_REPOSITORY_NAME: ${{ secrets.PRIVATE_NATIVE_IOS_REPOSITORY_NAME }}
PRIVATE_NATIVE_ANDROID_REPOSITORY_URL: ${{ secrets.PRIVATE_NATIVE_ANDROID_REPOSITORY_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ secrets.GH_USERNAME }}
GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
FIREBASE_APP_ID_IOS: ${{ secrets.FIREBASE_APP_ID_IOS }}
FIREBASE_APP_ID_ANDROID: ${{ secrets.FIREBASE_APP_ID_ANDROID }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
MATCH_GIT_AUTHORIZATION: ${{ secrets.MATCH_GIT_AUTHORIZATION }}
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
DEVELOPER_PORTAL_TEAM_ID: ${{ secrets.DEVELOPER_PORTAL_TEAM_ID }}
CODE_SIGNING_IDENTITY: ${{ secrets.CODE_SIGNING_IDENTITY }}
PROVISIONING_PROFILE_SPECIFIER: ${{ secrets.PROVISIONING_PROFILE_SPECIFIER }}
TEMP_KEYCHAIN_NAME: ${{ secrets.TEMP_KEYCHAIN_NAME }}
SIGNING_CONFIGS: ${{ secrets.SIGNING_CONFIGS }}
KEYSTORE_FILE: ${{ secrets.KEYSTORE_FILE }}
CURRENT_BUILD_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
jobs:
versioning:
name: Fetch Versions
runs-on: ubuntu-latest
outputs:
sdk-version: ${{ steps.get-versions.outputs.sdk-version }}
app-version: ${{ steps.get-versions.outputs.app-version }}
build-number: ${{ steps.get-versions.outputs.build-number }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch Versions
id: get-versions
uses: ./.github/actions/get-versions
publish-ios:
name: Publishing iOS App
needs: [versioning]
runs-on: ${{ github.event.inputs.ios-runner-type || 'self-hosted' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update Configuration
uses: ./.github/actions/update-config
- name: Setup Flutter
uses: ./.github/actions/setup-flutter
- name: Increment Build Number
uses: ./.github/actions/increment-build-number
with:
build-number: ${{ needs.versioning.outputs.build-number }}
- name: Update Flutter Dependencies
uses: ./.github/actions/update-flutter-dependencies
with:
sdk-version: ${{ needs.versioning.outputs.sdk-version }}
- name: Setup iOS Environment
uses: ./.github/actions/setup-ios
- name: Build And Distribute The iOS Example App
env:
PRIVATE_NATIVE_REPOSITORY_URL: ${{ env.PRIVATE_NATIVE_IOS_REPOSITORY_URL }}
uses: maierj/[email protected]
with:
lane: 'develop'
subdirectory: 'ios'
options: |
{
"version": "${{ needs.versioning.outputs.app-version }}",
"build_number": "${{ needs.versioning.outputs.build-number }}"
}
publish-android:
name: Publishing Android App
needs: [versioning]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update Configuration
uses: ./.github/actions/update-config
- name: Setup Flutter
uses: ./.github/actions/setup-flutter
- name: Increment Build Number
uses: ./.github/actions/increment-build-number
with:
build-number: ${{ needs.versioning.outputs.build-number }}
- name: Update Flutter Dependencies
uses: ./.github/actions/update-flutter-dependencies
with:
sdk-version: ${{ needs.versioning.outputs.sdk-version }}
- name: Setup Android Environment
uses: ./.github/actions/setup-android
- name: Build And Distribute The Android Example App
env:
PRIVATE_NATIVE_REPOSITORY_URL: ${{ env.PRIVATE_NATIVE_ANDROID_REPOSITORY_URL }}
uses: maierj/[email protected]
with:
lane: 'develop'
subdirectory: 'android'
options: |
{
"version": "${{ needs.versioning.outputs.app-version }}",
"build_number": "${{ needs.versioning.outputs.build-number }}"
}
tag:
name: Tagging
needs: [versioning, publish-ios, publish-android]
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v4
- name: Create Tag
uses: ./.github/actions/create-tag
with:
build-category: 'build'
app-version: ${{ needs.versioning.outputs.app-version }}
build-number: ${{ needs.versioning.outputs.build-number }}