Use npm trusted publishing

This commit is contained in:
auggie2lbcf
2026-05-04 12:55:49 -05:00
parent fe7ffda7db
commit a6ffb7c5cc
+2 -3
View File
@@ -16,6 +16,7 @@
name: Release name: Release
permissions: permissions:
"contents": "write" "contents": "write"
"id-token": "write"
# This task will run whenever you push a git tag that looks like a version # This task will run whenever you push a git tag that looks like a version
# like "1.0.0", "v0.1.0-prerelease.1", "my-app/0.1.0", "releases/v1.0.0", etc. # like "1.0.0", "v0.1.0-prerelease.1", "my-app/0.1.0", "releases/v1.0.0", etc.
@@ -296,15 +297,13 @@ jobs:
merge-multiple: true merge-multiple: true
- uses: actions/setup-node@v6 - uses: actions/setup-node@v6
with: with:
node-version: '20.x' node-version: '24.x'
registry-url: 'https://registry.npmjs.org' registry-url: 'https://registry.npmjs.org'
- run: | - run: |
for release in $(echo "$PLAN" | jq --compact-output '.releases[] | select([.artifacts[] | endswith("-npm-package.tar.gz")] | any)'); do for release in $(echo "$PLAN" | jq --compact-output '.releases[] | select([.artifacts[] | endswith("-npm-package.tar.gz")] | any)'); do
pkg=$(echo "$release" | jq '.artifacts[] | select(endswith("-npm-package.tar.gz"))' --raw-output) pkg=$(echo "$release" | jq '.artifacts[] | select(endswith("-npm-package.tar.gz"))' --raw-output)
npm publish --access public "./npm/${pkg}" npm publish --access public "./npm/${pkg}"
done done
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
announce: announce:
needs: needs: