Skip to content

Commit 6ccd84c

Browse files
committed
Add version extraction from git tag
1 parent 6025e4b commit 6ccd84c

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,15 @@ jobs:
2525
run: npm install -g npm@latest
2626

2727
- run: npm ci
28+
29+
- name: Extract version from tag
30+
id: version
31+
run: |
32+
VERSION=${GITHUB_REF#refs/tags/v}
33+
echo "version=$VERSION" >> $GITHUB_OUTPUT
34+
35+
- name: Update package version
36+
run: npm version ${{ steps.version.outputs.version }} --no-git-tag-version
37+
2838
- run: npm run build --if-present
2939
- run: npm publish --access public

0 commit comments

Comments
 (0)