Skip to content

Commit 746b247

Browse files
authored
Tweak logging related to NPM_TOKEN/OIDC auth (#566)
1 parent 54220dd commit 746b247

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,16 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined;
9999
`//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN}\n`
100100
);
101101
}
102+
} else if (
103+
process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN &&
104+
process.env.ACTIONS_ID_TOKEN_REQUEST_URL
105+
) {
106+
core.info(
107+
"No NPM_TOKEN found, but OIDC is available - using npm trusted publishing"
108+
);
102109
} else {
103110
core.info(
104-
"No NPM_TOKEN found - assuming trusted publishing or npm is already authenticated"
111+
"No NPM_TOKEN or OIDC available - assuming npm is already authenticated"
105112
);
106113
}
107114

0 commit comments

Comments
 (0)