Skip to content

Commit 4ee3a07

Browse files
authored
feat: setup auto deploy (#227)
1 parent 086e266 commit 4ee3a07

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

.github/workflows/public.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish
2+
on:
3+
push:
4+
branches:
5+
- 'master'
6+
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-18.04
11+
strategy:
12+
matrix:
13+
node-version: [12]
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
with:
18+
fetch-depth: 0
19+
- uses: actions/setup-node@v1
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
- name: Get yarn cache
23+
id: yarn-cache
24+
run: echo "::set-output name=dir::$(yarn cache dir)"
25+
- uses: actions/cache@v2
26+
with:
27+
path: ${{ steps.yarn-cache.outputs.dir }}
28+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
29+
- name: Install Dependencies
30+
run: yarn
31+
- name: Publish Package
32+
run: yarn ci:publish
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
35+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"android": "react-native run-android",
1919
"flow": "flow",
2020
"lint": "eslint . --cache",
21-
"tsc": "tsc --noEmit"
21+
"tsc": "tsc --noEmit",
22+
"ci:publish": "yarn semantic-release"
2223
},
2324
"peerDependencies": {
2425
"react": ">=16.0",

0 commit comments

Comments
 (0)