File tree Expand file tree Collapse file tree 2 files changed +60
-0
lines changed Expand file tree Collapse file tree 2 files changed +60
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Test
2+
3+ on : [ push, pull_request, release ]
4+
5+ jobs :
6+ test :
7+ name : Running jest
8+ runs-on : ubuntu-latest
9+ steps :
10+ - uses : actions/checkout@v3
11+ with :
12+ fetch-depth : 0
13+ - name : Use Node.js 18.x
14+ uses : actions/setup-node@v3
15+ with :
16+ node-version : " 18.x"
17+ cache : " yarn"
18+ - name : Get yarn cache directory path
19+ id : yarn-cache-dir-path
20+ run : echo "::set-output name=dir::$(yarn config get cacheFolder)"
21+ - uses : actions/cache@v3
22+ id : yarn-cache
23+ with :
24+ path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
25+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
26+ restore-keys : |
27+ ${{ runner.os }}-yarn-
28+ - name : Install Dependencies
29+ run : yarn install
30+ - name : Build
31+ run : yarn build
32+ - name : Test
33+ run : yarn test
Original file line number Diff line number Diff line change 1+ name : publish to NPM
2+ on :
3+ release :
4+ types : [ published ]
5+ jobs :
6+ npm-publish :
7+ name : npm
8+ environment : Publish
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Checkout repository
12+ uses : actions/checkout@v2
13+
14+ - name : Use Node.js 18.x
15+ uses : actions/setup-node@v3
16+ with :
17+ node-version : ' 18.x'
18+ cache : ' yarn'
19+ registry-url : ' https://registry.npmjs.org'
20+
21+ - name : Install dependencies
22+ run : yarn install
23+
24+ - name : Publish to npm
25+ run : npm publish
26+ env :
27+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments