Skip to content

Commit fe4fdb9

Browse files
committed
Merge branch 'main' into release/2.0.0
2 parents c0cb5d9 + 22f3d72 commit fe4fdb9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+4450
-2784
lines changed
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Deploy iOS demo app
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 'release/**'
8+
9+
# cancel previous workflow runs that are not completed yet
10+
# ref: https://github.com/TeamAmaze/AmazeFileManager/blob/release/3.7/.github/workflows/android-feature.yml#L10-L12
11+
concurrency:
12+
group: deploy-ios-demo-app-${{ github.event.pull_request.number || github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
deploy-ios-demo-app:
17+
timeout-minutes: 35
18+
runs-on: [self-hosted]
19+
env:
20+
FL_OUTPUT_DIR: output
21+
steps:
22+
- uses: actions/checkout@v3
23+
with:
24+
fetch-depth: 2
25+
lfs: true
26+
27+
- name: Create iOS config files
28+
env:
29+
IOS_FASTLANE_ENV: '${{ secrets.IOS_FASTLANE_ENV }}'
30+
APP_STORE_CONNECT_API_KEY_P8_APP_MANAGER: '${{ secrets.APP_STORE_CONNECT_API_KEY_P8_APP_MANAGER }}'
31+
run: |
32+
echo $IOS_FASTLANE_ENV | base64 --decode > ios/fastlane/.env.default
33+
echo $APP_STORE_CONNECT_API_KEY_P8_APP_MANAGER | base64 --decode > ios/fastlane/AuthKey_A9LPUK52N8.p8
34+
- name: Dump Xcode path to check which version
35+
run: 'echo "Xcode path: $(xcode-select -p)"' # e.g. -> "Xcode path: /Applications/Xcode-14.2.0.app/Contents/Developer"
36+
37+
# setup yarn
38+
- uses: actions/setup-node@v3
39+
with:
40+
node-version-file: '.nvmrc' # ref: https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#node-version-file
41+
# cache: "yarn"
42+
- name: Dump node and yarn versions
43+
run: 'echo "node: $(node -v) yarn: $(yarn -v)"'
44+
- name: Install Dependencies
45+
run: yarn install --immutable --immutable-cache
46+
47+
# 目前跑 Install Bundler 會失敗,先注解掉
48+
# - name: Install bundler
49+
# run: gem install bundler:2.2.27 --user-install # bundler for our lockfile
50+
# working-directory: ios
51+
- name: Bundle Install
52+
run: bundle install
53+
working-directory: ios
54+
- name: Dump ruby and bundler version
55+
run: 'echo "ruby: $(ruby -v) bundler: $(bundle -v)"'
56+
working-directory: ios
57+
58+
- name: Print app build-number
59+
run: bundle exec fastlane print_build_number
60+
working-directory: ios
61+
62+
- name: Save PR_NUMBER to env
63+
run: |
64+
PR_NUMBER=$(gh pr view --json number -q .number)
65+
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
66+
continue-on-error: true
67+
- name: Replace patch with PR_NUMBER on version name
68+
if: ${{ env.PR_NUMBER != '' }}
69+
run: sed -i -e "/MARKETING_VERSION/ s/\(\.[0-9]*\)\..*/\1.${{ env.PR_NUMBER }};/" ios/CoolWalletAppDemo.xcodeproj/project.pbxproj
70+
- name: Deploy demo App to TestFlight
71+
run: bundle exec fastlane deploy_demo_app
72+
working-directory: ios
73+
74+
- name: Send deployed message to Slack
75+
env:
76+
GITHUB_SECRET_SLACK_WEBHOOK_URL_COOLBITX_BOT: '${{ secrets.SLACK_WEBHOOK_URL_COOLBITX_BOT }}'
77+
run: bundle exec fastlane slack_deployed_message_for_demo_app
78+
working-directory: ios
79+
80+
- name: Report error to Slack
81+
uses: 8398a7/action-slack@v3
82+
with:
83+
status: ${{ job.status }}
84+
fields: repo,pullRequest,commit,author,job,took # selectable (default: repo,message)
85+
env:
86+
SLACK_WEBHOOK_URL: '${{ secrets.SLACK_WEBHOOK_URL_COOLBITX_BOT }}'
87+
if: ${{ failure() }}

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23-
ios/.xcode.env.local
23+
**/.xcode.env.local
2424

2525
# Android/IntelliJ
2626
#
@@ -33,6 +33,7 @@ local.properties
3333
.cxx/
3434
*.keystore
3535
!debug.keystore
36+
.kotlin/
3637

3738
# node.js
3839
#
@@ -56,7 +57,7 @@ yarn-error.log
5657
*.jsbundle
5758

5859
# Ruby / CocoaPods
59-
/ios/Pods/
60+
**/Pods/
6061
/vendor/bundle/
6162

6263
# Temporary files created by Metro to check the health of the file watcher

Gemfile

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
source 'https://rubygems.org'
22

33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4-
ruby ">= 2.6.10"
4+
ruby '>= 2.6.10'
55

6-
gem 'cocoapods', '~> 1.12'
6+
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
7+
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
8+
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
9+
gem 'xcodeproj', '< 1.26.0'
10+
gem 'concurrent-ruby', '< 1.3.4'
11+
12+
# ====== fastlane ======
13+
gem 'fastlane'
14+
15+
plugins_path = File.join(File.dirname(__FILE__), 'ios', 'fastlane', 'Pluginfile')
16+
eval_gemfile(plugins_path) if File.exist?(plugins_path)
17+
# ====== fastlane ======

0 commit comments

Comments
 (0)