Skip to content

Commit 9c454b9

Browse files
committed
Update NPM Publish GitHub Action
1 parent b0d9299 commit 9c454b9

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

.github/workflows.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
name: NPM publish
2-
32
on:
43
push:
54
tags:
65
- '*'
7-
86
jobs:
9-
npm-publish:
7+
build:
108
runs-on: ubuntu-latest
11-
129
steps:
13-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v3
11+
# Setup .npmrc file to publish to npm
12+
- uses: actions/setup-node@v3
1413
with:
15-
ref: ${{ github.event.release.target_commitish }}
16-
- uses: actions/setup-node@v1
17-
with:
18-
node-version: 12
19-
- run: npm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}"
14+
node-version: '16.x'
15+
registry-url: 'https://registry.npmjs.org'
16+
- run: npm ci
2017
- run: npm publish
2118
env:
22-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
19+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)