-
-
Notifications
You must be signed in to change notification settings - Fork 25
68 lines (66 loc) · 2.9 KB
/
build.yml
File metadata and controls
68 lines (66 loc) · 2.9 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
# action 语法 https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
# Build Check 仅在提交后做编译检查
name: ZLGithub Build Check
on: # 触发条件
push:
branches-ignore:
- master
- develop
- release
jobs:
build:
name: build
runs-on: macos-latest # runner 系统
steps:
- name: checkout
uses: actions/checkout@v2.0.0
#with:
#ref: ${{ env.GITHUB_REF }} # 默认是切到出发workflow的节点
- name: download secret file
working-directory: ./ZLGitHubClient # 指定run 的工作目录
env:
GITHUBTOKEN: ${{ secrets.GITHUBTOKEN }}
run: |
pip3 install requests
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: |
echo "start construct build enviroment"
gem cleanup
gem install bundler
bundle install
bundle exec pod repo update
bundle exec pod install
echo "construct build enviroment success"
- name: build app
working-directory: ./ZLGitHubClient # 指定run 的工作目录
env:
MATCH_KEYCHAIN_NAME: ${{ secrets.MATCH_KEYCHAIN_NAME }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GITHUB_URL: ${{ secrets.MATCH_GITHUB_URL }}
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.apple_pwd }} # pwd for upload to testflight
FASTLANE_USER: ${{ secrets.FASTLANE_USER }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
run: |
echo "start project build check"
bundle exec fastlane github_action_build_check
echo "project build success"
- name: email send for fail
working-directory: ./ZLGitHubClient/EmailSender
if: ${{ failure() }} # expression https://docs.github.com/en/actions/learn-github-actions/expressions#job-status-check-functions
env:
NOREPLEY_PWD: ${{ secrets.NOREPLY_PASSWD }}
Email_Receivers: ${{ secrets.Email_Receivers }}
run: |
python3 BuildCheckEmailSender.py $NOREPLEY_PWD $Email_Receivers false
- name: email send for success
working-directory: ./ZLGitHubClient/EmailSender
if: ${{ success() }} # expression https://docs.github.com/en/actions/learn-github-actions/expressions#job-status-check-functions
env:
NOREPLEY_PWD: ${{ secrets.NOREPLY_PASSWD }}
Email_Receivers: ${{ secrets.Email_Receivers }}
run: |
python3 BuildCheckEmailSender.py $NOREPLEY_PWD $Email_Receivers true