File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,8 +60,10 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined;
6060 core . info ( "Found existing user .npmrc file" ) ;
6161 const userNpmrcContent = await fs . readFile ( userNpmrcPath , "utf8" ) ;
6262 const authLine = userNpmrcContent . split ( "\n" ) . find ( ( line ) => {
63- // check based on https://github.com/npm/cli/blob/8f8f71e4dd5ee66b3b17888faad5a7bf6c657eed/test/lib/adduser.js#L103-L105
64- return / ^ \s * \/ \/ r e g i s t r y \. n p m j s \. o r g \/ : [ _ - ] a u t h T o k e n = / i. test ( line ) ;
63+ // npm registry format: https://github.com/npm/cli/blob/8f8f71e4dd5ee66b3b17888faad5a7bf6c657eed/test/lib/adduser.js#L103-L105
64+ // github registry format: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#authenticating-with-a-personal-access-token
65+ // also allow support for custom domain format, eg: //code.org.com/packages/npm/:_authToken=
66+ return / : [ _ - ] a u t h T o k e n = / i. test ( line ) ;
6567 } ) ;
6668 if ( authLine ) {
6769 core . info (
You can’t perform that action at this time.
0 commit comments