Skip to content

Commit dc6ad0b

Browse files
authored
Fix npm publish script (#5068)
The `id` is also an output from this workflow so needs re-adding, not sure how the token stuck around, I thought I removed that
1 parent 9769c05 commit dc6ad0b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/release-npm.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ jobs:
3636
run: "yarn install --frozen-lockfile"
3737

3838
- name: 🚀 Publish to npm
39-
run: npm publish --provenance --access public --tag "$TAG"
39+
id: npm-publish
40+
run: |
41+
npm publish --provenance --access public --tag "$TAG"
42+
release=$(jq -r '"\(.name)@\(.version)"' package.json)
43+
echo "id=$release" >> $GITHUB_OUTPUT
4044
env:
41-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4245
TAG: ${{ contains(steps.npm-publish.outputs.id, '-rc.') && 'next' || 'latest' }}

0 commit comments

Comments
 (0)