diff --git a/dist/index.js b/dist/index.js index 70db244..79bd741 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2019,14 +2019,6 @@ module.exports = require("path"); /***/ }), -/***/ 477: -/***/ ((module) => { - -"use strict"; -module.exports = require("querystring"); - -/***/ }), - /***/ 404: /***/ ((module) => { @@ -2085,47 +2077,32 @@ var __webpack_exports__ = {}; // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. (() => { const core = __nccwpck_require__(186); -const { stringify } = __nccwpck_require__(477); -const npm_auth_token = core.getInput('npm_auth_token', { required: true }); -const gh_token = core.getInput('gh_token', { required: true }); +const npm_auth_token = core.getInput("npm_auth_token", { required: true }); +const gh_token = core.getInput("gh_token", { required: true }); const main = async () => { - const execSync = (__nccwpck_require__(81).execSync); - - try { - const gitoutput = execSync('git log -1') - if (gitoutput.includes('skip ci' )) - { - console.log('skipping due to [skip ci] message') + try { + const gitoutput = execSync("git log -1"); + if (gitoutput.includes("skip ci")) { + console.log("skipping due to [skip ci] message"); return; } - execSync(`echo "//registry.npmjs.org/:_authToken=${npm_auth_token}" > .npmrc`, - {stdio: 'inherit'}) - execSync('yarn global add auto', - {stdio: 'inherit'}) - execSync('yarn install --frozen-lockfile', - {stdio: 'inherit'}) - execSync('yarn build', - {stdio: 'inherit'}) - execSync('git config user.email "internal-automation.bot@jupiterone.com"', - {stdio: 'inherit'}) - execSync('git config user.email "internal-automation.bot@jupiterone.com"', - {stdio: 'inherit'}) - execSync('git config user.name "j1-internal-automation"', - {stdio: 'inherit'}) - execSync('git config --global commit.verbose true', - {stdio: 'inherit'}) - execSync('git fetch --tags', - {stdio: 'inherit'}) - execSync(`NPM_TOKEN=${npm_auth_token} GH_TOKEN=${gh_token} auto shipit --email internal-automation.bot@jupiterone.com --name j1-internal-automation`, - {stdio: 'inherit'}) - } - catch (error) { + execSync(`echo "//registry.npmjs.org/:_authToken=${npm_auth_token}" > .npmrc`, { stdio: "inherit" }); + execSync("yarn global add auto@11.0.1", { stdio: "inherit" }); + execSync("yarn install --frozen-lockfile", { stdio: "inherit" }); + execSync("yarn build", { stdio: "inherit" }); + execSync('git config user.email "internal-automation.bot@jupiterone.com"', { stdio: "inherit" }); + execSync('git config user.email "internal-automation.bot@jupiterone.com"', { stdio: "inherit" }); + execSync('git config user.name "j1-internal-automation"', { stdio: "inherit" }); + execSync("git config --global commit.verbose true", { stdio: "inherit" }); + execSync("git fetch --tags", { stdio: "inherit" }); + execSync(`NPM_TOKEN=${npm_auth_token} GH_TOKEN=${gh_token} auto shipit --email internal-automation.bot@jupiterone.com --name j1-internal-automation`, { stdio: "inherit" }); + } catch (error) { core.setFailed(error.message); } -} +}; main(); diff --git a/package-lock.json b/package-lock.json index bee8e5b..45132d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,34 +1,50 @@ { "name": "action-npm-build-release", "version": "1.0.0", - "lockfileVersion": 1, + "lockfileVersion": 3, "requires": true, - "dependencies": { - "@actions/core": { + "packages": { + "": { + "name": "action-npm-build-release", + "version": "1.0.0", + "hasInstallScript": true, + "license": "ISC", + "dependencies": { + "@actions/core": "^1.8.2", + "@vercel/ncc": "^0.34.0" + } + }, + "node_modules/@actions/core": { "version": "1.8.2", "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.8.2.tgz", "integrity": "sha512-FXcBL7nyik8K5ODeCKlxi+vts7torOkoDAKfeh61EAkAy1HAvwn9uVzZBY0f15YcQTcZZ2/iSGBFHEuioZWfDA==", - "requires": { + "dependencies": { "@actions/http-client": "^2.0.1" } }, - "@actions/http-client": { + "node_modules/@actions/http-client": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", - "requires": { + "dependencies": { "tunnel": "^0.0.6" } }, - "@vercel/ncc": { + "node_modules/@vercel/ncc": { "version": "0.34.0", "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.34.0.tgz", - "integrity": "sha512-G9h5ZLBJ/V57Ou9vz5hI8pda/YQX5HQszCs3AmIus3XzsmRn/0Ptic5otD3xVST8QLKk7AMk7AqpsyQGN7MZ9A==" + "integrity": "sha512-G9h5ZLBJ/V57Ou9vz5hI8pda/YQX5HQszCs3AmIus3XzsmRn/0Ptic5otD3xVST8QLKk7AMk7AqpsyQGN7MZ9A==", + "bin": { + "ncc": "dist/ncc/cli.js" + } }, - "tunnel": { + "node_modules/tunnel": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", - "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + } } } } diff --git a/src/index.js b/src/index.js index e8931bd..b949f49 100644 --- a/src/index.js +++ b/src/index.js @@ -1,44 +1,29 @@ -const core = require('@actions/core'); -const { stringify } = require('querystring'); -const npm_auth_token = core.getInput('npm_auth_token', { required: true }); -const gh_token = core.getInput('gh_token', { required: true }); +const core = require("@actions/core"); +const npm_auth_token = core.getInput("npm_auth_token", { required: true }); +const gh_token = core.getInput("gh_token", { required: true }); const main = async () => { + const execSync = require("child_process").execSync; - const execSync = require('child_process').execSync; - try { - - const gitoutput = execSync('git log -1') - if (gitoutput.includes('skip ci' )) - { - console.log('skipping due to [skip ci] message') + const gitoutput = execSync("git log -1"); + if (gitoutput.includes("skip ci")) { + console.log("skipping due to [skip ci] message"); return; } - execSync(`echo "//registry.npmjs.org/:_authToken=${npm_auth_token}" > .npmrc`, - {stdio: 'inherit'}) - execSync('yarn global add auto', - {stdio: 'inherit'}) - execSync('yarn install --frozen-lockfile', - {stdio: 'inherit'}) - execSync('yarn build', - {stdio: 'inherit'}) - execSync('git config user.email "internal-automation.bot@jupiterone.com"', - {stdio: 'inherit'}) - execSync('git config user.email "internal-automation.bot@jupiterone.com"', - {stdio: 'inherit'}) - execSync('git config user.name "j1-internal-automation"', - {stdio: 'inherit'}) - execSync('git config --global commit.verbose true', - {stdio: 'inherit'}) - execSync('git fetch --tags', - {stdio: 'inherit'}) - execSync(`NPM_TOKEN=${npm_auth_token} GH_TOKEN=${gh_token} auto shipit --email internal-automation.bot@jupiterone.com --name j1-internal-automation`, - {stdio: 'inherit'}) - } - catch (error) { + execSync(`echo "//registry.npmjs.org/:_authToken=${npm_auth_token}" > .npmrc`, { stdio: "inherit" }); + execSync("yarn global add auto@11.0.1", { stdio: "inherit" }); + execSync("yarn install --frozen-lockfile", { stdio: "inherit" }); + execSync("yarn build", { stdio: "inherit" }); + execSync('git config user.email "internal-automation.bot@jupiterone.com"', { stdio: "inherit" }); + execSync('git config user.email "internal-automation.bot@jupiterone.com"', { stdio: "inherit" }); + execSync('git config user.name "j1-internal-automation"', { stdio: "inherit" }); + execSync("git config --global commit.verbose true", { stdio: "inherit" }); + execSync("git fetch --tags", { stdio: "inherit" }); + execSync(`NPM_TOKEN=${npm_auth_token} GH_TOKEN=${gh_token} auto shipit --email internal-automation.bot@jupiterone.com --name j1-internal-automation`, { stdio: "inherit" }); + } catch (error) { core.setFailed(error.message); } -} +}; main();