Skip to content

Commit d66d06d

Browse files
committed
Update npm-publish.yml workflow to publish release on tag push
1 parent dc91573 commit d66d06d

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

.github/workflows/npm-publish.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,13 @@
44
name: Node.js Package
55

66
on:
7-
release:
8-
types: [created]
7+
push:
8+
tags:
9+
- 'v*'
910
workflow_dispatch:
1011

1112
jobs:
12-
build:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- uses: actions/checkout@v3
16-
- uses: actions/setup-node@v3
17-
with:
18-
node-version: 16
19-
- run: npm ci
20-
# - run: npm test
21-
2213
publish-npm:
23-
needs: build
2414
runs-on: ubuntu-latest
2515
steps:
2616
- uses: actions/checkout@v3
@@ -32,3 +22,14 @@ jobs:
3222
- run: npm publish
3323
env:
3424
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
25+
26+
create-release:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Create Release
30+
id: create_release
31+
uses: softprops/action-gh-release@v2
32+
with:
33+
draft: false
34+
prerelease: false
35+
generate_release_notes: true

0 commit comments

Comments
 (0)