Skip to content

Commit 9900090

Browse files
committed
feat: gh js dynamic version
1 parent a486b44 commit 9900090

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/publish-js.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@ jobs:
3434
- name: Install dependencies
3535
run: npm ci
3636

37+
- name: Set version from release tag
38+
if: github.event_name == 'release'
39+
run: |
40+
VERSION="${GITHUB_REF_NAME#v}"
41+
npm version "$VERSION" --no-git-tag-version
42+
43+
- name: Show publish metadata
44+
run: |
45+
echo "Tag: ${GITHUB_REF_NAME:-manual}"
46+
npm pkg get name version
47+
3748
- name: Build
3849
run: npm run build
3950

0 commit comments

Comments
 (0)