Skip to content

Commit

Permalink
Upgrade JS-DevTools/npm-publish to v2
Browse files Browse the repository at this point in the history
- Upgrade JS-DevTools/npm-publish to v2.1.0
- Remove workaround for bug JS-DevTools/npm-publish#15
- Remove usage of `jq` in favor of npm-publish output
  • Loading branch information
mcous committed May 29, 2023
1 parent b29e1e9 commit 8011a46
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/release-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,15 @@ jobs:

- name: 🚀 Publish to npm
id: npm-publish
uses: JS-DevTools/npm-publish@0f451a94170d1699fd50710966d48fb26194d939 # v1
uses: JS-DevTools/npm-publish@541aa6b21b4a1e9990c95a92c21adc16b35e9551 # v2.1.0
with:
token: ${{ secrets.NPM_TOKEN }}
access: public
tag: next

- name: 🎖️ Add `latest` dist-tag to final releases
if: github.event.release.prerelease == false
run: |
package=$(cat package.json | jq -er .name)
npm dist-tag add "$package@$release" latest
if: github.event.release.prerelease == false && steps.npm-publish.outputs.id
run: npm dist-tag add "$release" latest
env:
# JS-DevTools/npm-publish overrides `NODE_AUTH_TOKEN` with `INPUT_TOKEN` in .npmrc
INPUT_TOKEN: ${{ secrets.NPM_TOKEN }}
release: ${{ steps.npm-publish.outputs.version }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
release: ${{ steps.npm-publish.outputs.id }}

0 comments on commit 8011a46

Please sign in to comment.