Skip to content

Commit d4323bd

Browse files
geroplona-agent
andcommitted
[npm] Remove NPM_AUTH_TOKEN env vars for OIDC-based publishing
OIDC-based npm publishing doesn't require explicit token env vars. The previous commit added OIDC support but left the token handling code in place. This removes it. Co-authored-by: Ona <[email protected]>
1 parent ac18dcd commit d4323bd

File tree

3 files changed

+1
-14
lines changed

3 files changed

+1
-14
lines changed

.github/workflows/branch-build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ jobs:
256256
VERSION: ${{needs.configuration.outputs.version}}
257257
PR_NO_CACHE: ${{needs.configuration.outputs.build_no_cache}}
258258
PR_NO_TEST: ${{needs.configuration.outputs.build_no_test}}
259-
NPM_AUTH_TOKEN: "${{ secrets.NPM_AUTH_TOKEN }}"
260259
PUBLISH_TO_NPM: ${{ needs.configuration.outputs.publish_to_npm == 'true' || needs.configuration.outputs.is_main_branch == 'true' }}
261260
JB_MARKETPLACE_PUBLISH_TOKEN: "${{ secrets.JB_MARKETPLACE_PUBLISH_TOKEN }}"
262261
PUBLISH_TO_JBPM: ${{ needs.configuration.outputs.publish_to_jbmp == 'true' || needs.configuration.outputs.is_main_branch == 'true' }}

.github/workflows/build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ jobs:
259259
VERSION: ${{needs.configuration.outputs.version}}
260260
PR_NO_CACHE: ${{needs.configuration.outputs.build_no_cache}}
261261
PR_NO_TEST: ${{needs.configuration.outputs.build_no_test}}
262-
NPM_AUTH_TOKEN: "${{ secrets.NPM_AUTH_TOKEN }}"
263262
PUBLISH_TO_NPM: ${{ needs.configuration.outputs.publish_to_npm == 'true' || needs.configuration.outputs.is_main_branch == 'true' }}
264263
JB_MARKETPLACE_PUBLISH_TOKEN: "${{ secrets.JB_MARKETPLACE_PUBLISH_TOKEN }}"
265264
PUBLISH_TO_JBPM: ${{ needs.configuration.outputs.publish_to_jbmp == 'true' || needs.configuration.outputs.is_main_branch == 'true' }}

components/gitpod-protocol/scripts/publish.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,13 @@ const path = require("path");
1111
const child_process = require("child_process");
1212
const qualifier = process.argv[2];
1313

14-
const rootDir = process.cwd();
15-
const pckDir = path.join(rootDir, process.argv[3]);
14+
const pckDir = path.join(process.cwd(), process.argv[3]);
1615

1716
if (process.env.DO_PUBLISH === "false") {
1817
console.warn("Skipping publishing per request.");
1918
process.exit(0);
2019
}
2120

22-
if (process.env.NPM_AUTH_TOKEN) {
23-
fs.writeFileSync(
24-
path.join(pckDir, ".npmrc"),
25-
`//registry.npmjs.org/:_authToken=${process.env.NPM_AUTH_TOKEN}\n`,
26-
"utf-8",
27-
);
28-
} else {
29-
console.warn("NPM_AUTH_TOKEN env variable is not set");
30-
}
31-
3221
const pck = JSON.parse(fs.readFileSync(path.join(pckDir, "package.json"), "utf-8"));
3322
pck.version = `${pck.version}-${qualifier}`;
3423
fs.writeFileSync(path.join(pckDir, "package.json"), JSON.stringify(pck, undefined, 2), "utf-8");

0 commit comments

Comments
 (0)