Skip to content

Commit

Permalink
Fix release-npm output id
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Telatynski <[email protected]>
  • Loading branch information
t3chguy committed Feb 25, 2025
1 parent 524cb65 commit 27002a0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/release-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,17 @@ jobs:
run: "yarn install --frozen-lockfile"

- name: 🚀 Publish to npm
run: npm publish --provenance --access public --tag next
id: npm-publish
run: |
npm publish --provenance --access public --tag next
release=$(jq -r '"\(.name)@\(.version)"' package.json)
echo "id=$release" >> $GITHUB_OUTPUT
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: 🎖️ Add `latest` dist-tag to final releases
if: steps.npm-publish.outputs.id && !contains(steps.npm-publish.outputs.id, '-rc.')
run: |
release=$(jq -r '"\(.name)@\(.version)"' package.json)
npm dist-tag add "$release" latest
run: npm dist-tag add "$release" latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
release: ${{ steps.npm-publish.outputs.id }}

0 comments on commit 27002a0

Please sign in to comment.