File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish Release to npm
2
+ on :
3
+ release :
4
+ types : [published]
5
+ permissions : read-all
6
+ jobs :
7
+ build :
8
+ runs-on : ubuntu-latest
9
+ permissions :
10
+ contents : read
11
+ id-token : write
12
+ steps :
13
+ - uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7
14
+ - uses : actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # 4.0.3
15
+ with :
16
+ node-version : " 20"
17
+ registry-url : ' https://registry.npmjs.org'
18
+ - run : npm ci
19
+ - run : npm test
20
+ - if : ${{ github.event.release.tag_name != '' && env.NPM_PUBLISH_TAG != '' }}
21
+ run : npm publish --provenance --access=public --tag=${{ env.NPM_PUBLISH_TAG }}
22
+ env :
23
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
24
+ NPM_PUBLISH_TAG : ${{ contains(github.event.release.tag_name, '-alpha.') && 'canary' || 'latest' }}
You can’t perform that action at this time.
0 commit comments