Skip to content

Commit 77ce326

Browse files
committed
Update workflow
Include- Update version in package.json to match release tag, in publish action
1 parent a486a98 commit 77ce326

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ jobs:
2121
- name: Set up Bun
2222
uses: oven-sh/setup-bun@v2
2323

24+
- name: Update version in package.json to match release tag
25+
run: |
26+
RELEASE_TAG=${GITHUB_REF#refs/tags/}
27+
jq --arg tag "$RELEASE_TAG" '.version = $tag' package.json > package.json.tmp && mv package.json.tmp package.json
28+
git config user.name "github-actions"
29+
git config user.email "[email protected]"
30+
git commit -am "Update version to match release tag $RELEASE_TAG"
31+
git push
32+
2433
- name: Install dependencies
2534
run: bun i
2635

0 commit comments

Comments
 (0)