From 0dbb0eb06d22064baed8bb8f0b66200069aacf35 Mon Sep 17 00:00:00 2001 From: Ranieri Althoff Date: Sun, 25 Aug 2024 10:07:43 +0200 Subject: [PATCH] Fix publishing with NPM tag without git tag For reasons beyond my comprehension, when you assign `default` to a GitHub Action input value, it does _not_ prefill the input with that value when it is missing. I guess we are changing what `default` means? --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ef5f710..0520044 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -199,8 +199,10 @@ jobs: run: | git config --global user.name 'github-actions[bot]' git config --global user.email 'github-actions[bot]@users.noreply.github.com' - npm publish --tag ${{ inputs.npm-tag }} --new-version $(echo $VERSION | sed 's/^v//') + npm version --no-git-tag-version $VERSION + npm publish --tag $TAG if: ${{ !env.ACT }} env: NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + TAG: ${{ inputs.npm-tag || 'latest' }} VERSION: ${{ inputs.new-version || github.ref_name }}