File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change 4
4
pull_request :
5
5
push :
6
6
branches : [ "main" ]
7
- tags : [ "*" ]
7
+ release :
8
+ types : [created]
8
9
9
10
jobs :
10
11
build :
11
-
12
12
runs-on : ubuntu-latest
13
-
14
13
strategy :
15
14
matrix :
16
15
node-version : [18.x, 20.x, 22.x]
17
-
18
16
steps :
19
17
- uses : actions/checkout@v4
20
18
- name : Use Node.js ${{ matrix.node-version }}
24
22
cache : ' npm'
25
23
- run : npm ci
26
24
- run : npm run build --if-present
25
+
26
+ publish-npm :
27
+ needs : build
28
+ runs-on : ubuntu-latest
29
+ if : github.event_name == 'release'
30
+ steps :
31
+ - uses : actions/checkout@v4
32
+ - uses : actions/setup-node@v4
33
+ with :
34
+ node-version : 20
35
+ registry-url : https://registry.npmjs.org/
36
+ - run : npm ci
37
+ - run : npm publish
38
+ env :
39
+ NODE_AUTH_TOKEN : ${{secrets.npm_token}}
You can’t perform that action at this time.
0 commit comments