Skip to content

Commit a3fb67c

Browse files
committed
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?
1 parent 0fffd19 commit a3fb67c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/release.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,10 @@ jobs:
199199
run: |
200200
git config --global user.name 'github-actions[bot]'
201201
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
202-
npm publish --tag ${{ inputs.npm-tag }} --new-version $(echo $VERSION | sed 's/^v//')
202+
npm version --allow-same-version --no-git-tag-version $VERSION
203+
npm publish --tag $TAG
203204
if: ${{ !env.ACT }}
204205
env:
205206
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
207+
TAG: ${{ inputs.npm-tag || 'latest' }}
206208
VERSION: ${{ inputs.new-version || github.ref_name }}

0 commit comments

Comments
 (0)