File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Package to npmjs
2+ on :
3+ release :
4+ types : [published]
5+ jobs :
6+ build :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - uses : actions/checkout@v4
10+
11+ - name : Find yarn cache location
12+ id : yarn-cache
13+ run : echo "::set-output name=dir::$(yarn cache dir)"
14+
15+ - name : JS package cache
16+ uses : actions/cache@v1
17+ with :
18+ path : $(( steps.yarn-cache.outputs.dir ))
19+ key : $(( runner.os ))-yarn-$(( hashFiles('**/yarn.lock') ))
20+ restore-keys : |
21+ $(( runner.os ))-yarn-
22+
23+ - name : Install Dependencies
24+ run : yarn install
25+
26+ - name : Compile the Library
27+ run : yarn build-lib
28+ # Setup .npmrc file to publish to npm
29+ - uses : actions/setup-node@v4
30+ with :
31+ node-version : ' 20.11.1'
32+ registry-url : ' https://registry.npmjs.org'
33+ - run : npm ci
34+ - run : npm publish
35+ env :
36+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments