Skip to content

Commit 9f3d52a

Browse files
committed
Auto version
1 parent ee5920e commit 9f3d52a

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v3
1515

16+
- name: Update package.json
17+
run: |
18+
# Extract the version from the git tag (e.g., "v1.0.0")
19+
version=$(echo "${{ github.ref }}" | sed -e 's/^refs\/tags\/v//')
20+
21+
# Update the package.json version
22+
npm version "$version"
23+
1624
- name: Setup Node.js
1725
uses: actions/setup-node@v2
1826
with:

0 commit comments

Comments
 (0)