Skip to content

Commit 8011a46

Browse files
committed
Upgrade JS-DevTools/npm-publish to v2
- 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
1 parent b29e1e9 commit 8011a46

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

.github/workflows/release-npm.yml

+5-8
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,15 @@ jobs:
2424

2525
- name: 🚀 Publish to npm
2626
id: npm-publish
27-
uses: JS-DevTools/npm-publish@0f451a94170d1699fd50710966d48fb26194d939 # v1
27+
uses: JS-DevTools/npm-publish@541aa6b21b4a1e9990c95a92c21adc16b35e9551 # v2.1.0
2828
with:
2929
token: ${{ secrets.NPM_TOKEN }}
3030
access: public
3131
tag: next
3232

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

0 commit comments

Comments
 (0)