Use npm trusted publishing
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user