File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Checkout
12+ uses : actions/checkout@v1
13+
14+ - name : Setup node
15+ uses : actions/setup-node@v1
16+ with :
17+ node-version : 12
18+ registry-url : https://registry.npmjs.org/
19+
20+ - name : Get yarn cache directory path
21+ id : yarn-cache-dir-path
22+ run : echo "::set-output name=dir::$(yarn cache dir)"
23+
24+ - uses : actions/cache@v1.1.2
25+ id : yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
26+ with :
27+ path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
28+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
29+ restore-keys : |
30+ ${{ runner.os }}-yarn-
31+
32+ - name : Install packages
33+ run : yarn install
34+
35+ - name : Test
36+ run : yarn test
37+
38+ - name : Build
39+ run : yarn build
40+
41+ - name : Publish
42+ run : npm publish --access public
43+ env :
44+ NODE_AUTH_TOKEN : ${{secrets.NPM_AUTH_TOKEN}}
You can’t perform that action at this time.
0 commit comments