-
Notifications
You must be signed in to change notification settings - Fork 54
101 lines (97 loc) · 3.45 KB
/
assemble_ios_debug.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
# 工作流名称
name: Assemble Ios Debug
# 触发工作流程的事件
on:
push:
tags: [ v*, r*, i* ]
pull_request:
branches: [ master ]
workflow_dispatch:
# 工作流环境变量
env:
# 应用的application_id
APP_ID: ${{secrets.APP_ID}}
APP_NAME: Taro
VERSION_NUMBER: 1.11.0
BUILD_TYPE: debug
TEAM_ID: ${{secrets.TEAM_ID}}
PROVISIONING_PROFILE_SPECIFIER: ${{secrets.DEBUG_PROVISIONING_PROFILE_SPECIFIER}}
CODE_SIGN_IDENTITY: Apple Development
SIGNING_CERTIFICATE_P12_DATA: ${{secrets.DEBUG_SIGNING_CERTIFICATE_P12_DATA}}
SIGNING_CERTIFICATE_PASSWORD: ${{secrets.DEBUG_SIGNING_CERTIFICATE_PASSWORD}}
PROVISIONING_PROFILE_DATA: ${{secrets.DEBUG_PROVISIONING_PROFILE_DATA}}
jobs:
assemble:
runs-on: macos-13
strategy:
matrix:
node-version: [18]
steps:
- name: Checkout Project
uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Cache Pods
uses: actions/cache@v2
with:
path: ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Install pods
run: cd ios && pod update --no-repo-update
- name: Import signing certificate
env:
SIGNING_CERTIFICATE_P12_DATA: ${{ env.SIGNING_CERTIFICATE_P12_DATA }}
SIGNING_CERTIFICATE_PASSWORD: ${{ env.SIGNING_CERTIFICATE_PASSWORD }}
run: |
exec .github/scripts/import-certificate.sh
- name: Import provisioning profile
env:
PROVISIONING_PROFILE_DATA: ${{ env.PROVISIONING_PROFILE_DATA }}
run: |
exec .github/scripts/import-profile.sh
- name: Build app
env:
FL_APP_IDENTIFIER: ${{ env.APP_ID }}
FL_UPDATE_PLIST_DISPLAY_NAME: ${{ env.APP_NAME }}
FL_UPDATE_PLIST_PATH: taroDemo/Info.plist
FL_VERSION_NUMBER_VERSION_NUMBER: ${{ env.VERSION_NUMBER }}
FL_BUILD_NUMBER_BUILD_NUMBER: ${{ env.BUILD_NUMBER }}
FL_CODE_SIGN_IDENTITY: ${{ env.CODE_SIGN_IDENTITY }}
FL_PROVISIONING_PROFILE_SPECIFIER: ${{ env.PROVISIONING_PROFILE_SPECIFIER }}
FASTLANE_TEAM_ID: ${{ env.TEAM_ID }}
NODE_PATH: ${{ github.workspace }}/node_modules/.pnpm/node_modules:$NODE_PATH
run: |
cd ios
bundle update
bundle exec fastlane build_dev
- name: Upload Ios Products
uses: actions/upload-artifact@v2
with:
name: app-${{ env.BUILD_TYPE }}
path: |
${{ github.workspace }}/ios/taroDemo.ipa
${{ github.workspace }}/ios/taroDemo.app.dSYM.zip
- name: Rename release assets
run: |
mv ios/taroDemo.ipa ios/app-${{ env.BUILD_TYPE }}.ipa
mv ios/taroDemo.app.dSYM.zip ios/app-${{ env.BUILD_TYPE }}.app.dSYM.zip
- name: Upload release assets
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: ${{ contains(github.ref, 'beta') }}
files: |
ios/app-${{ env.BUILD_TYPE }}.ipa
ios/app-${{ env.BUILD_TYPE }}.app.dSYM.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}