@@ -6947,7 +6947,7 @@ function wrappy (fn, cb) {
69476947
69486948/***/ } ) ,
69496949
6950- /***/ 648 :
6950+ /***/ 986 :
69516951/***/ ( ( __unused_webpack_module , __webpack_exports__ , __webpack_require__ ) => {
69526952
69536953"use strict" ;
@@ -6966,18 +6966,18 @@ var external_fs_ = __webpack_require__(747);
69666966var external_path_ = __webpack_require__ ( 622 ) ;
69676967var external_path_default = /*#__PURE__*/ __webpack_require__ . n ( external_path_ ) ;
69686968
6969- // CONCATENATED MODULE: ./src/config.ts
6969+ // CONCATENATED MODULE: ./src/npm- config.ts
69706970
69716971
69726972
69736973const npmrc = external_path_default ( ) . resolve ( process . env [ 'RUNNER_TEMP' ] || process . cwd ( ) , '.npmrc' ) ;
6974- async function npmConfigRegistry ( registryUrl , token ) {
6974+ async function npmConfig ( registryUrl , token , message ) {
69756975 if ( ! registryUrl . endsWith ( '/' ) ) {
69766976 registryUrl += '/' ;
69776977 }
69786978 core . info ( `Setup NPM registry URL: ${ registryUrl } on ${ npmrc } ` ) ;
6979- registryUrl = registryUrl . replace ( / ( ^ \w + : | ^ ) / , '' ) + ' :_authToken=${NODE_AUTH_TOKEN}' ;
6980- await external_fs_ . promises . writeFile ( npmrc , registryUrl , 'utf-8' ) ;
6979+ await external_fs_ . promises . writeFile ( npmrc , ( ` ${ registryUrl . replace ( / ( ^ \w + : | ^ ) / , '' ) } :_authToken=\ ${NODE_AUTH_TOKEN}\n` +
6980+ `message= ${ message } \n` ) , 'utf-8' ) ;
69816981 return {
69826982 NPM_CONFIG_USERCONFIG : npmrc ,
69836983 NODE_AUTH_TOKEN : token
@@ -6998,8 +6998,9 @@ async function npmConfigRegistry(registryUrl, token) {
69986998 const githubToken = core . getInput ( 'github_token' , { required : true } ) ;
69996999 const publish = core . getInput ( 'publish' ) !== 'false' ;
70007000 const push = core . getInput ( 'push' ) !== 'false' ;
7001- const gitUserName = core . getInput ( 'git_user_name' ) ;
7002- const gitUserEmail = core . getInput ( 'git_user_email' ) ;
7001+ const name = core . getInput ( 'name' ) ;
7002+ const email = core . getInput ( 'email' ) ;
7003+ const message = core . getInput ( 'message' ) ;
70037004 let publishToGithub ;
70047005 let publishToNPM ;
70057006 let privatePackage ;
@@ -7057,8 +7058,10 @@ async function npmConfigRegistry(registryUrl, token) {
70577058 cliPath = `node_modules/${ cli } /${ JSON
70587059 . parse ( ( await external_fs_ . promises . readFile ( `node_modules/${ cli } /package.json` ) ) . toString ( ) )
70597060 . bin [ cli ] } `;
7061+ await exec . exec ( 'git' , [ 'config' , '--global' , 'user.name' , name ] ) ;
7062+ await exec . exec ( 'git' , [ 'config' , '--global' , 'user.email' , email ] ) ;
70607063 core . info ( `Creating release on GitHub${ publishToGithub ? ' and publishing to GitHub registry' : '' } ...` ) ;
7061- await release ( cliPath , true , publishToGithub , {
7064+ await release ( cliPath , true , publishToGithub , message , {
70627065 ...process . env ,
70637066 NPM_CONFIG_REGISTRY : `https://npm.pkg.github.com` ,
70647067 NPM_TOKEN : githubToken ,
@@ -7067,7 +7070,7 @@ async function npmConfigRegistry(registryUrl, token) {
70677070 core . info ( 'Release available on GitHub' ) ;
70687071 publishToGithub && core . info ( 'Package available on GitHub registry' ) ;
70697072 publishToNPM && core . info ( 'Publishing to NPM registry...' ) ;
7070- await release ( cliPath , false , publishToNPM , {
7073+ await release ( cliPath , false , publishToNPM , message , {
70717074 ...process . env ,
70727075 NPM_CONFIG_REGISTRY : 'https://registry.npmjs.org' ,
70737076 NPM_TOKEN : npmToken ,
@@ -7076,8 +7079,6 @@ async function npmConfigRegistry(registryUrl, token) {
70767079 publishToNPM && core . info ( 'Package available on NPM registry' ) ;
70777080 if ( push ) {
70787081 core . info ( 'Pushing changes to GitHub repository...' ) ;
7079- await exec . exec ( 'git' , [ 'config' , '--global' , 'user.name' , gitUserName ] ) ;
7080- await exec . exec ( 'git' , [ 'config' , '--global' , 'user.email' , gitUserEmail ] ) ;
70817082 await exec . exec ( 'git' , [ 'push' ] ) ;
70827083 core . info ( 'GitHub repository up to date' ) ;
70837084 }
@@ -7086,7 +7087,7 @@ async function npmConfigRegistry(registryUrl, token) {
70867087 core . setFailed ( error . message ) ;
70877088 }
70887089} ) ( ) ;
7089- async function lernaRelease ( path , release , publish , env = { } ) {
7090+ async function lernaRelease ( path , release , publish , message , env = { } ) {
70907091 if ( release ) {
70917092 await exec . exec ( 'node' , [
70927093 path ,
@@ -7097,7 +7098,7 @@ async function lernaRelease(path, release, publish, env = {}) {
70977098 ] , { env } ) ;
70987099 }
70997100 if ( publish ) {
7100- const npmEnv = await npmConfigRegistry ( env . NPM_CONFIG_REGISTRY , env . NPM_TOKEN ) ;
7101+ const npmEnv = await npmConfig ( env . NPM_CONFIG_REGISTRY , env . NPM_TOKEN , message ) ;
71017102 await exec . exec ( 'node' , [
71027103 path ,
71037104 'publish' ,
@@ -7110,7 +7111,7 @@ async function lernaRelease(path, release, publish, env = {}) {
71107111 } ) ;
71117112 }
71127113}
7113- async function semanticRelease ( path , release , publish , env = { } ) {
7114+ async function semanticRelease ( path , release , publish , message , env = { } ) {
71147115 if ( release ) {
71157116 await exec . exec ( 'node' , [
71167117 path ,
@@ -7120,7 +7121,7 @@ async function semanticRelease(path, release, publish, env = {}) {
71207121 ] , { env } ) ;
71217122 }
71227123 if ( publish ) {
7123- const npmEnv = await npmConfigRegistry ( env . NPM_CONFIG_REGISTRY , env . NPM_TOKEN ) ;
7124+ const npmEnv = await npmConfig ( env . NPM_CONFIG_REGISTRY , env . NPM_TOKEN , message ) ;
71247125 await exec . exec ( 'yarn' , [
71257126 'publish' ,
71267127 '--non-interactive' ,
@@ -7331,6 +7332,6 @@ module.exports = require("zlib");;
73317332/******/ // module exports must be returned from runtime so entry inlining is disabled
73327333/******/ // startup
73337334/******/ // Load entry module and return exports
7334- /******/ return __webpack_require__ ( 648 ) ;
7335+ /******/ return __webpack_require__ ( 986 ) ;
73357336/******/ } ) ( )
73367337;
0 commit comments