Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f4d04c4

Browse files
authored
fix: gitlab example for trusted publishing (#1710)
I haven't been quite able to make trusted publishing work in GitLab (see npm/cli#8558), but I do think the example is incorrect. `id_tokens` is not a valid global keyword. It needs to be specified under `default` or a job. I think a job makes more sense. Reference: * https://docs.gitlab.com/ci/yaml/#global-keywords * https://docs.gitlab.com/ci/yaml/#default * https://docs.gitlab.com/ci/yaml/#id_tokens
1 parent a69464d commit f4d04c4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

content/packages-and-modules/securing-your-code/trusted-publishers.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,6 @@ stages:
118118
variables:
119119
NODE_VERSION: '20'
120120
121-
id_tokens:
122-
NPM_ID_TOKEN:
123-
aud: "npm:registry.npmjs.org"
124-
125121
test:
126122
stage: test
127123
image: node:${NODE_VERSION}
@@ -132,6 +128,9 @@ test:
132128
publish:
133129
stage: publish
134130
image: node:${NODE_VERSION}
131+
id_tokens:
132+
NPM_ID_TOKEN:
133+
aud: "npm:registry.npmjs.org"
135134
script:
136135
# Ensure npm 11.5.1 or later is installed
137136
- npm install -g npm@latest

0 commit comments

Comments
 (0)