We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ac7c13d + 663e888 commit 36d3bd2Copy full SHA for 36d3bd2
.github/workflows/release.yml
@@ -0,0 +1,31 @@
1
+name: Publish to npm on Release
2
+
3
+on:
4
+ release:
5
+ types: [created]
6
7
+jobs:
8
+ publish:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: Checkout code
12
+ uses: actions/checkout@v2
13
14
+ - name: Set up Node.js
15
+ uses: actions/setup-node@v3
16
+ with:
17
+ node-version: '16'
18
+ registry-url: 'https://registry.npmjs.org/'
19
20
+ - name: Install dependencies
21
+ run: npm install
22
23
+ - name: Update version in package.json
24
+ run: |
25
+ RELEASE_VERSION=$(echo ${{ github.event.release.tag_name }} | sed 's/^v//')
26
+ npm version $RELEASE_VERSION --no-git-tag-version
27
28
+ - name: Publish to npm
29
+ run: npm publish
30
+ env:
31
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
0 commit comments