File tree Expand file tree Collapse file tree 3 files changed +56
-3
lines changed Expand file tree Collapse file tree 3 files changed +56
-3
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
-
4
1
name : CI
5
2
6
3
on :
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 75
75
"react" : " ^16.8.0 || ^17.0.0 || ^18.0.0" ,
76
76
"react-dom" : " ^16.8.0 || ^17.0.0 || ^18.0.0"
77
77
},
78
+ "publishConfig" : {
79
+ "access" : " public" ,
80
+ "provenance" : true
81
+ },
78
82
"files" : [
79
83
" dist" ,
80
84
" src"
You can’t perform that action at this time.
0 commit comments