File tree Expand file tree Collapse file tree 3 files changed +54
-4
lines changed
Expand file tree Collapse file tree 3 files changed +54
-4
lines changed Original file line number Diff line number Diff line change 1- # This workflow will do a clean install of node dependencies and run tests
2- # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3-
41name : CI
52
63on :
Original file line number Diff line number Diff line change 1+ name : Publish
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ permissions :
8+ id-token : write
9+
10+ jobs :
11+ publish :
12+ name : Publish
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - name : Checkout
17+ uses : actions/checkout@v3
18+
19+ - name : Cache .yarn/cache
20+ uses : actions/cache@v3
21+ env :
22+ cache-name : yarn-cache
23+ with :
24+ path : .yarn/cache
25+ key : ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
26+ restore-keys : |
27+ ${{ runner.os }}-${{ env.cache-name }}
28+
29+ - name : Use Node.js
30+ uses : actions/setup-node@v3
31+ with :
32+ node-version : ' 18'
33+
34+ - name : Enable Corepack
35+ run : corepack enable
36+
37+ - name : Install dependencies
38+ run : yarn --immutable
39+ env :
40+ HUSKY : 0
41+
42+ - name : Publish with latest tag
43+ if : github.event.release.prelease == false
44+ run : yarn npm publish --tag latest
45+ env :
46+ YARN_NPM_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
47+
48+ - name : Publish with next tag
49+ if : github.event.release.prelease == true
50+ run : yarn npm publish --tag next
51+ env :
52+ YARN_NPM_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 4242 "vitest" : " ^0.30.1"
4343 },
4444 "publishConfig" : {
45- "access" : " public"
45+ "access" : " public" ,
46+ "provenance" : true
4647 },
4748 "files" : [
4849 " dist" ,
You can’t perform that action at this time.
0 commit comments