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 44 pull_request :
55 push :
66 branches : [ "main" ]
7- tags : [ "*" ]
7+ release :
8+ types : [created]
89
910jobs :
1011 build :
11-
1212 runs-on : ubuntu-latest
13-
1413 strategy :
1514 matrix :
1615 node-version : [18.x, 20.x, 22.x]
17-
1816 steps :
1917 - uses : actions/checkout@v4
2018 - name : Use Node.js ${{ matrix.node-version }}
2422 cache : ' npm'
2523 - run : npm ci
2624 - 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