From ad1ef4f766be11569cc4e828e4d3c0a8dc5d787d Mon Sep 17 00:00:00 2001 From: Bastien Robert Date: Tue, 19 Jan 2021 11:44:04 +0100 Subject: [PATCH] fix: create release env vars from current process's env destructuring --- dist/index.js | 2 ++ src/index.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/dist/index.js b/dist/index.js index 45228b7..8f95337 100644 --- a/dist/index.js +++ b/dist/index.js @@ -7030,6 +7030,7 @@ __webpack_require__.r(__webpack_exports__); .bin[cli]}`; _actions_core__WEBPACK_IMPORTED_MODULE_0__.info(`Creating release on GitHub${publishToGithub ? ' and publishing to GitHub registry' : ''}...`); await release(cliPath, true, publishToGithub, { + ...process.env, NPM_CONFIG_REGISTRY: `https://npm.pkg.github.com/${owner}`, NPM_TOKEN: githubToken, GITHUB_TOKEN: githubToken @@ -7038,6 +7039,7 @@ __webpack_require__.r(__webpack_exports__); publishToGithub && _actions_core__WEBPACK_IMPORTED_MODULE_0__.info('Package available on GitHub registry'); publishToNPM && _actions_core__WEBPACK_IMPORTED_MODULE_0__.info('Publishing to NPM registry...'); await release(cliPath, false, publishToNPM, { + ...process.env, NPM_CONFIG_REGISTRY: 'https://registry.npmjs.org', NPM_TOKEN: npmToken }); diff --git a/src/index.ts b/src/index.ts index 6b2b1c5..67bd0f6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -101,6 +101,7 @@ import { promises as fs } from 'fs' ) await release(cliPath, true, publishToGithub, { + ...process.env, NPM_CONFIG_REGISTRY: `https://npm.pkg.github.com/${owner}`, NPM_TOKEN: githubToken, GITHUB_TOKEN: githubToken @@ -119,6 +120,7 @@ import { promises as fs } from 'fs' ) await release(cliPath, false, publishToNPM, { + ...process.env, NPM_CONFIG_REGISTRY: 'https://registry.npmjs.org', NPM_TOKEN: npmToken })