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.
1 parent 282740c commit 2291788Copy full SHA for 2291788
.github/workflows/npm-publish.yml
@@ -28,6 +28,18 @@ jobs:
28
node-version: 20
29
registry-url: https://registry.npmjs.org/
30
- run: npm ci
31
+
32
+ # Extract version from release tag and update package.json
33
+ - name: Get version from tag
34
+ id: version
35
+ run: |
36
+ VERSION="${GITHUB_REF#refs/tags/v}"
37
+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"
38
+ echo "Extracted version: $VERSION"
39
40
+ - name: Update package.json version
41
+ run: npm version "${{ steps.version.outputs.version }}" --no-git-tag-version --allow-same-version
42
43
- run: npm publish
44
env:
45
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
0 commit comments