Skip to content

Commit

Permalink
Fix publishing with NPM tag without git tag
Browse files Browse the repository at this point in the history
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?
  • Loading branch information
ranisalt committed Aug 25, 2024
1 parent 0fffd19 commit 0dbb0eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 0dbb0eb

Please sign in to comment.