Skip to content

Commit 39a134e

Browse files
authored
Fix: Set version dynamically
1 parent 169b80e commit 39a134e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/npm-publish.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
22
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
33

4-
name: Node.js Package
4+
name: Release Node.js Package
55

66
on:
77
release:
@@ -25,6 +25,9 @@ jobs:
2525
version: latest
2626
run_install: false
2727

28+
- name: Set version
29+
run: npm pkg set version=${GITHUB_REF#refs/tags/}
30+
2831
- name: Publish to NPM
2932
run: pnpm publish --access public --no-git-checks
3033
env:

0 commit comments

Comments
 (0)