-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (52 loc) · 1.84 KB
/
rnpack.yml
File metadata and controls
59 lines (52 loc) · 1.84 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
name: pack
on:
push:
tags:
- '*'
jobs:
build:
name: Create a react native project
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set env
run: echo ::set-env name=VERSION::${GITHUB_REF#refs/*/} && sudo gem install cocoapods --no-document
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Init Project
run: npx react-native init rncn --version ${{ env.VERSION }} --template react-native-template-typescript
- name: Zip
run: rm -rf rncn/node_modules && zip -r -X -s 9m rncn.zip rncn
- name: Commit files
run: |
git config --local user.email "sunnylqm@gmail.com"
git config --local user.name "sunnylqm"
rm -rf .github && rm README.md && rm -rf rncn
git add .
git commit -m "Add rnpack" -a
- name: Push to repo
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ env.VERSION }}
force: true