File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,9 @@ async function createSecret(info) {
3535 const response = await request ( {
3636 method : 'GET' ,
3737 url : `${ info . github . endpoint } /repos/${ owner } /${ repo } /actions/secrets/public-key` ,
38- auth : info . github ,
38+ auth : {
39+ bearer : info . github . token ,
40+ } ,
3941 headers : { 'User-Agent' : 'semantic-release' , 'X-GitHub-OTP' : info . github . code } ,
4042 } ) ;
4143 if ( response . statusCode === 200 ) {
@@ -46,7 +48,9 @@ async function createSecret(info) {
4648 const responsePut = await request ( {
4749 method : 'PUT' ,
4850 url : `${ info . github . endpoint } /repos/${ owner } /${ repo } /actions/secrets/NPM_TOKEN` ,
49- auth : info . github ,
51+ auth : {
52+ bearer : info . github . token ,
53+ } ,
5054 headers : { 'User-Agent' : 'semantic-release' , 'X-GitHub-OTP' : info . github . code } ,
5155 json : true ,
5256 body : {
Original file line number Diff line number Diff line change @@ -35,5 +35,6 @@ module.exports = async function (info) {
3535 if ( ! token ) throw new Error ( 'User could not supply GitHub Personal Access Token.' ) ;
3636
3737 info . github . token = token ;
38+ info . github . endpoint = 'https://api.github.com' ;
3839 log . info ( 'Successfully created GitHub token.' ) ;
3940} ;
You can’t perform that action at this time.
0 commit comments