Skip to content

Commit 7682b78

Browse files
authored
Merge pull request #23 from github/hmaurer-patch-2
Set package version based on release tag before publish
2 parents a9470b2 + 8468b23 commit 7682b78

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/publish.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name: Publish
33
on:
44
release:
55
types: [created]
6-
workflow_dispatch:
76

87
jobs:
98
publish-npm:
@@ -19,6 +18,9 @@ jobs:
1918
cache: npm
2019
- run: npm ci
2120
- run: npm test
21+
- run: npm version ${TAG_NAME} --git-tag-version=false
22+
env:
23+
TAG_NAME: ${{ github.event.release.tag_name }}
2224
- run: npm whoami; npm publish --access public
2325
env:
2426
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

0 commit comments

Comments
 (0)