Skip to content

Commit 27002a0

Browse files
committed
Fix release-npm output id
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
1 parent 524cb65 commit 27002a0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/release-npm.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,17 @@ jobs:
3535
run: "yarn install --frozen-lockfile"
3636

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

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

0 commit comments

Comments
 (0)