Skip to content

Commit ba05c1e

Browse files
authored
Update publish.yaml (#1005)
1 parent 0ffe0d9 commit ba05c1e

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
release:
55
types: [published]
66

7+
permissions:
8+
id-token: write # Required for OIDC
9+
contents: read
10+
711
jobs:
812
publish-and-deploy-documentation:
913
runs-on: ubuntu-latest
@@ -13,10 +17,13 @@ jobs:
1317
with:
1418
ref: ${{ github.event.release.tag_name }}
1519
- name: Setup Node environment
16-
uses: actions/setup-node@v1
20+
uses: actions/setup-node@v4
1721
with:
1822
node-version: 20
1923
registry-url: https://registry.npmjs.org/
24+
# Ensure npm 11.5.1 or later is installed
25+
- name: Update npm
26+
run: npm install -g npm@latest
2027
- name: NPM Install
2128
run: npm install
2229
- name: NPM run build
@@ -30,10 +37,6 @@ jobs:
3037
- name: Publish to NPM latest
3138
if: steps.npm_tag.outputs.npm_tag == ''
3239
run: npm publish
33-
env:
34-
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
3540
- name: Publish to NPM with tag
3641
if: steps.npm_tag.outputs.npm_tag != ''
3742
run: npm publish --tag ${{ steps.npm_tag.outputs.npm_tag }}
38-
env:
39-
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

0 commit comments

Comments
 (0)