Skip to content

Commit eaf347f

Browse files
committed
Set package.json version at publish time
1 parent 4ed5238 commit eaf347f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
working-directory: ./
2323
- run: yarn test
2424
- uses: battila7/get-version-action@v2
25+
# Set the version in package.json to match the tag
26+
- run: "npm version ${{ steps.get_version.outputs.version-without-v }}"
2527
- uses: JS-DevTools/npm-publish@v3
2628
with:
2729
token: ${{ secrets.NPM_TOKEN }}
@@ -45,6 +47,8 @@ jobs:
4547
install-command: yarn --frozen-lockfile --silent
4648
working-directory: ./
4749
- uses: battila7/get-version-action@v2
50+
# Set the version in package.json to match the tag
51+
- run: "npm version ${{ steps.get_version.outputs.version-without-v }}"
4852
- uses: JS-DevTools/npm-publish@v3
4953
with:
5054
token: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)