forked from NervJS/taro-native-shell
-
Notifications
You must be signed in to change notification settings - Fork 0
128 lines (110 loc) · 3.53 KB
/
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
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
name: Debug CI
on:
push:
branches: [ main ]
tags: [ d* ]
jobs:
build-taro:
runs-on: macos-latest
strategy:
matrix:
node-version: [14.16.0]
steps:
- name: Fecth Taro JS Project
uses: actions/checkout@v2
with:
repository: xieweilyg/Taro-Mortgage-Calculator
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install yarn dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: |
yarn install
- name: Build Taro JS Bundle
run: |
npx taro build --type rn --platform ios
- name: Upload Taro Products
uses: actions/upload-artifact@v2
with:
name: taro-ios-products
path: dist/rn/ios/
- name: Upload release assets
if: startsWith(github.ref, 'refs/tags/d')
uses: softprops/action-gh-release@v1
with:
files: |
dist/rn/ios/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-ios:
needs: build-taro
runs-on: macos-latest
strategy:
matrix:
node-version: [14.16.0]
steps:
- name: Checkout project
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn install
- name: Install pods
run: cd ios && pod install
- name: Change react-native-xcode.sh
run: |
cd node_modules/react-native/scripts
echo "exit 0;">react-native-xcode.sh
- name: Set environment variables from project settings
run: |
exec .github/scripts/set-env-from-xcodeproj.sh
- name: Import signing certificate
env:
SIGNING_CERTIFICATE_P12_DATA: ${{ secrets.DEBUG_SIGNING_CERTIFICATE_P12_DATA }}
SIGNING_CERTIFICATE_PASSWORD: ${{ secrets.DEBUG_SIGNING_CERTIFICATE_PASSWORD }}
run: |
exec .github/scripts/import-certificate.sh
- name: Import provisioning profile
env:
PROVISIONING_PROFILE_DATA: ${{ secrets.DEBUG_PROVISIONING_PROFILE_DATA }}
run: |
exec .github/scripts/import-profile.sh
- name: Download Taro Products
uses: actions/download-artifact@v2
with:
name: taro-ios-products
path: ~/download/taro-products
- name: Import Taro Product
run: |
mv ~/download/taro-products/main.jsbundle ./ios/main.jsbundle
rsync -a ~/download/taro-products/assets/ ./ios/assets/
cat ./ios/main.jsbundle
rm -rf ~/download/taro-products/
- name: Build app
run: |
pwd
cd ios
pwd
bundle update
bundle exec fastlane build_dev
- name: Upload release assets
if: startsWith(github.ref, 'refs/tags/d')
uses: softprops/action-gh-release@v1
with:
files: |
ios/taroDemo.ipa
ios/taroDemo.app.dSYM.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}