Skip to content

Commit 2291788

Browse files
authored
bump workflowy version & npm ver from git (danield137#5)
1 parent 282740c commit 2291788

File tree

3 files changed

+444
-427
lines changed

3 files changed

+444
-427
lines changed

.github/workflows/npm-publish.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ jobs:
2828
node-version: 20
2929
registry-url: https://registry.npmjs.org/
3030
- 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+
3143
- run: npm publish
3244
env:
3345
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

0 commit comments

Comments
 (0)