Skip to content

Commit de7bd49

Browse files
docs(README): fix yml files for OIDC auth
1 parent ef3a707 commit de7bd49

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/nodejs.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111

1212
permissions:
1313
id-token: write # Required for OIDC
14+
contents: read
1415

1516
jobs:
1617
lint-build-test:
@@ -52,7 +53,7 @@ jobs:
5253
contents: write # to be able to publish a GitHub release
5354
issues: write # to be able to comment on released issues
5455
pull-requests: write # to be able to comment on released pull requests
55-
id-token: write # Required for npm provenance
56+
id-token: write # Required for OIDC
5657

5758
steps:
5859
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
@@ -66,6 +67,12 @@ jobs:
6667
cache: 'yarn'
6768
registry-url: 'https://registry.npmjs.org'
6869

70+
# Upgrade npm to latest for OIDC support
71+
- name: Upgrade npm
72+
run: |
73+
npm install -g npm@latest
74+
echo "npm version: $(npm --version)"
75+
6976
- run: yarn install --frozen-lockfile
7077
- run: yarn build
7178

@@ -79,6 +86,10 @@ jobs:
7986
- name: Publish to npm with OIDC
8087
if: ${{ hashFiles('.release-created') != '' }}
8188
run: |
89+
echo "=== Debug Info ==="
8290
echo "npm version: $(npm --version)"
83-
echo "OIDC URL available: ${{ env.ACTIONS_ID_TOKEN_REQUEST_URL != '' }}"
84-
npm publish --workspaces --access public --provenance --registry https://registry.npmjs.org
91+
echo "node version: $(node --version)"
92+
echo "OIDC token URL available: ${ACTIONS_ID_TOKEN_REQUEST_URL:+yes}"
93+
echo "Registry: $(npm config get registry)"
94+
echo "==================="
95+
npm publish --workspaces --access public --provenance

0 commit comments

Comments
 (0)