-
-
Notifications
You must be signed in to change notification settings - Fork 25
74 lines (64 loc) · 2.72 KB
/
DailyCI.yml
File metadata and controls
74 lines (64 loc) · 2.72 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
# action 语法 https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: ZLGithub DailyCI
on: # 触发条件
schedule:
- cron: '0 18 * * *' # 每天北京时间凌晨两点打包
push:
branches:
- 'testflight/**' # 推送testflight分支
workflow_dispatch: # workflow_dispatch 事件触发
jobs:
build:
name: build
runs-on: macos-15 # runner 系统
steps:
- name: checkout
uses: actions/checkout@v2.0.0
with:
ref: master
- name: download secret file
working-directory: ./ZLGitHubClient # 指定run 的工作目录
env:
GITHUBTOKEN: ${{ secrets.GITHUBTOKEN }}
run: |
pip3 install requests --break-system-packages
python3 DownloadSecretFile/DownloadSecrectFile.py $GITHUBTOKEN
mv ZLGithubAppKey.h ZLGitHubClient/System/ZLSupportFiles/ZLGithubAppKey.h
mv GoogleService-Info.plist ZLGitHubClient/GoogleService-Info.plist
- name: construct build enviroment
working-directory: ./ZLGitHubClient # 指定run 的工作目录
run: |
gem cleanup
gem install bundler
bundle install
bundle exec pod repo update
bundle exec pod install
echo "construct build enviroment success"
- name: archive and upload app
working-directory: ./ZLGitHubClient # 指定run 的工作目录
env:
MATCH_KEYCHAIN_NAME: ${{ secrets.MATCH_KEYCHAIN_NAME }}
MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }}
MATCH_GITHUB_URL: ${{ secrets.MATCH_GITHUB_URL }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
APPSTOREAPIISSUERID: ${{ secrets.APPSTOREAPIISSUERID }}
APPSTOREAPIKEY: ${{ secrets.APPSTOREAPIKEY }}
APPSTOREAPIKEYID: ${{ secrets.APPSTOREAPIKEYID }}
run: |
pwd
bundle exec fastlane github_action_testFlight
echo "ipa build and upload success"
- name: upload github artifact
if: success()
uses: actions/upload-artifact@v4.6.2
with:
# Artifact name
name: ZLGitHubClient
# Directory containing files to upload
path: ./ZLGitHubClient/fastlane/ipa/TestFlight
- name: upload dSYM to firebase
working-directory: ./ZLGitHubClient # 指定run 的工作目录
run: |
unzip fastlane/ipa/TestFlight/ZLGitHubClient.app.dSYM.zip -d dSYMS
find ./dSYMS -name "*.dSYM" | sed 's/\ /\\ /' | xargs Pods/FirebaseCrashlytics/upload-symbols -gsp ZLGitHubClient/GoogleService-Info.plist -p ios