From eaf347f665773b059a2f5bf954a2b7e68d6a7dbd Mon Sep 17 00:00:00 2001 From: Tanner Stirrat Date: Wed, 2 Oct 2024 14:07:07 -0600 Subject: [PATCH] Set package.json version at publish time --- .github/workflows/publish.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 0d5f459..06e0e31 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -22,6 +22,8 @@ jobs: working-directory: ./ - run: yarn test - uses: battila7/get-version-action@v2 + # Set the version in package.json to match the tag + - run: "npm version ${{ steps.get_version.outputs.version-without-v }}" - uses: JS-DevTools/npm-publish@v3 with: token: ${{ secrets.NPM_TOKEN }} @@ -45,6 +47,8 @@ jobs: install-command: yarn --frozen-lockfile --silent working-directory: ./ - uses: battila7/get-version-action@v2 + # Set the version in package.json to match the tag + - run: "npm version ${{ steps.get_version.outputs.version-without-v }}" - uses: JS-DevTools/npm-publish@v3 with: token: ${{ secrets.NPM_TOKEN }}