Skip to content

Commit c330576

Browse files
committed
Update GitHub Actions workflow to use a more flexible version tag pattern and add a step to update the package version based on the tag.
1 parent 9a2a3a5 commit c330576

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Publish Package
33
on:
44
push:
55
tags:
6-
- 'v[0-9]+.[0-9]+.[0-9]+\-[0-9]{12}'
6+
- 'v*-*'
77

88

99
jobs:
@@ -42,6 +42,11 @@ jobs:
4242
- name: Build
4343
run: npm run build
4444

45+
- name: Update package version
46+
run: |
47+
TAG=${GITHUB_REF#refs/tags/v}
48+
npm version $TAG --no-git-tag-version
49+
4550
- name: Publish to GitHub Packages
4651
run: npm publish
4752
env:

0 commit comments

Comments
 (0)