-
Notifications
You must be signed in to change notification settings - Fork 11
165 lines (139 loc) · 5.25 KB
/
deploy-ios.yaml
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
157
158
159
160
161
162
163
164
165
name: Deploy iOS
on:
workflow_dispatch:
push:
branches:
- develop
concurrency:
group: ${{ github.workflow }}
jobs:
build:
runs-on: macos-14
timeout-minutes: 60
env:
TZ: Asia/Tokyo
FLUTTER_VERSION:
FLUTTER_CHANNEL:
FLUTTER_HOME:
PRODUCE_USERNAME: [email protected]
SPACESHIP_ONLY_ALLOW_INTERACTIVE_2FA: false
FASTLANE_USER: [email protected]
MATCH_USERNAME: [email protected]
MATCH_GIT_URL: [email protected]:YumNumm/apple_secrets.git
LANG: ja_JP.UTF-8
steps:
# https://github.com/actions/checkout/tree/v4/
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0
- name: Setup Application Runtime
uses: ./.github/actions/setup-application-runtime
# Certificateを取得するために、Deploy Keyを設定
- name: Set up ssh key
run: |
mkdir -p ~/.ssh/
echo "${{ secrets.SSH_ID_ED25519 }}" | base64 -d > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
eval $(ssh-agent -s)
echo "Host github.com \n\tIdentityFile ~/.ssh/id_ed25519\n\tUser git\n\tIdentityiesOnly yes" >> ~/.ssh/config
ssh-keyscan -H github.com >> ~/.ssh/known_hosts
# https://github.com/maxim-lobanov/setup-xcode/tree/v1/
- uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd
with:
xcode-version: latest-stable
- name: Show Xcode version
run: xcodebuild -version
- name: Pre set up ruby
run: cp .ruby-version app/ios/.ruby-version
- name: Set up ruby
# https://github.com/ruby/setup-ruby/tree/v1/
uses: ruby/setup-ruby@f26937343756480a8cb3ae1f623b9c8d89ed6984
with:
bundler-cache: true
working-directory: app/ios
- name: Install brew dependencies
working-directory: app/ios
run: brew bundle
- name: Resolve dependencies
run: melos bootstrap
- name: Install Pods
working-directory: app/ios
run: bundle exec pod install
- name: Set Firebase Configuration
run: echo '${{ secrets.FIREBASE_IOS }}' | base64 -d > app/ios/Runner/GoogleService-Info.plist
- name: Set App Store Connect Configuration
working-directory: app
env:
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
run: |
echo '${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}' | base64 -d > ios/AuthKey_NGL2W4BQP6.p8
- name: Set .env
working-directory: app
run: echo '${{ secrets.ENV}}' | base64 -d > .env
- name: Regenerate code
working-directory: app
run: dart run build_runner build --delete-conflicting-outputs
- name: Build IPA
working-directory: app/ios
env:
APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }}
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_BASE64: ${{secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}
PRODUCE_USERNAME: ${{ secrets.PRODUCE_USERNAME }}
SPACESHIP_ONLY_ALLOW_INTERACTIVE_2FA: false
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}
FASTLANE_USER: [email protected]
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
MATCH_USERNAME: [email protected]
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD}}
MATCH_GIT_URL: [email protected]:YumNumm/apple_secrets.git
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}
LANG: ja_JP.UTF-8
run: bundle exec fastlane build
- name: Upload artifact ipa
uses: actions/[email protected]
with:
path: app/ios/Runner.ipa
name: release-ios
deploy:
runs-on: macos-latest
needs: build
steps:
# https://github.com/actions/checkout
- name: Checkout
uses: actions/checkout@v4
with:
# Fetch all history for all tags and branches
fetch-depth: 0
- name: Download artifact ipa
uses: actions/download-artifact@v4
with:
name: release-ios
path: app/ios/output
- name: Install Gems
working-directory: app/ios
run: |
gem install bundler
bundle install
- name: Install Brewfile dependencies
working-directory: app/ios
run: brew bundle
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
- name: Show Xcode version
run: xcodebuild -version
- name: Set App Store Connect Configuration
working-directory: app
env:
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
run: |
echo '${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}' | base64 -d > ios/AuthKey_NGL2W4BQP6.p8
- name: Upload
run: |
mv output/Runner.ipa Runner.ipa
bundle exec fastlane upload
working-directory: app/ios