Compare commits

..
6 changed files with 55 additions and 115 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/setup-node@v1
- uses: bahmutov/npm-install@v1
- run: npx semantic-release
env:
+6 -5
View File
@@ -5,6 +5,7 @@ on:
branches:
- master
- renovate/**
- 1692/setup-renovate-debug
pull_request:
types:
@@ -16,9 +17,9 @@ jobs:
strategy:
matrix:
node-version:
- 10
# - 10
- 12
- 14
# - 14
runs-on: ubuntu-latest
@@ -27,11 +28,11 @@ jobs:
- run: git config --global user.name github-actions
- run: git config --global user.email github-actions@github.com
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- uses: bahmutov/npm-install@v1
- run: npm run test:ci
- run: npx ava test/integration.test.js
# separate job to set as required in branch protection,
# as the build names above change each time Node versions change
@@ -40,6 +41,6 @@ jobs:
needs: test_matrix
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/setup-node@v1
- uses: bahmutov/npm-install@v1
- run: npm run lint
+7
View File
@@ -21,6 +21,13 @@ See https://github.com/semantic-release/semantic-release/blob/master/docs/suppor
process.exit(1);
}
console.log("DEBUG START ==========")
console.log('process.env')
console.log(process.env)
console.log('envCi({ env: process.env })')
console.log(require('env-ci')({ env: process.env }))
console.log("DEBUG END ==========")
execa('git', ['--version'])
.then(({stdout}) => {
var gitVersion = findVersions(stdout)[0];
+14 -81
View File
@@ -464,22 +464,6 @@
"tempy": "^1.0.0"
},
"dependencies": {
"execa": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz",
"integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==",
"requires": {
"cross-spawn": "^7.0.0",
"get-stream": "^5.0.0",
"human-signals": "^1.1.1",
"is-stream": "^2.0.0",
"merge-stream": "^2.0.0",
"npm-run-path": "^4.0.0",
"onetime": "^5.1.0",
"signal-exit": "^3.0.2",
"strip-final-newline": "^2.0.0"
}
},
"tempy": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/tempy/-/tempy-1.0.0.tgz",
@@ -2272,15 +2256,15 @@
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"cosmiconfig": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz",
"integrity": "sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==",
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz",
"integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==",
"requires": {
"@types/parse-json": "^4.0.0",
"import-fresh": "^3.2.1",
"import-fresh": "^3.1.0",
"parse-json": "^5.0.0",
"path-type": "^4.0.0",
"yaml": "^1.10.0"
"yaml": "^1.7.2"
}
},
"create-ecdh": {
@@ -2802,24 +2786,6 @@
"requires": {
"execa": "^4.0.0",
"java-properties": "^1.0.0"
},
"dependencies": {
"execa": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz",
"integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==",
"requires": {
"cross-spawn": "^7.0.0",
"get-stream": "^5.0.0",
"human-signals": "^1.1.1",
"is-stream": "^2.0.0",
"merge-stream": "^2.0.0",
"npm-run-path": "^4.0.0",
"onetime": "^5.1.0",
"signal-exit": "^3.0.2",
"strip-final-newline": "^2.0.0"
}
}
}
},
"env-editor": {
@@ -3877,31 +3843,19 @@
}
},
"execa": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-5.0.0.tgz",
"integrity": "sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ==",
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz",
"integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==",
"requires": {
"cross-spawn": "^7.0.3",
"get-stream": "^6.0.0",
"human-signals": "^2.1.0",
"cross-spawn": "^7.0.0",
"get-stream": "^5.0.0",
"human-signals": "^1.1.1",
"is-stream": "^2.0.0",
"merge-stream": "^2.0.0",
"npm-run-path": "^4.0.1",
"onetime": "^5.1.2",
"signal-exit": "^3.0.3",
"npm-run-path": "^4.0.0",
"onetime": "^5.1.0",
"signal-exit": "^3.0.2",
"strip-final-newline": "^2.0.0"
},
"dependencies": {
"get-stream": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.0.tgz",
"integrity": "sha512-A1B3Bh1UmL0bidM/YX2NsCOTnGJePL9rO/M+Mw3m9f2gUpfokS0hi5Eah0WSUEWZdZhIZtMjkIYS7mDfOqNHbg=="
},
"human-signals": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
"integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw=="
}
}
},
"expand-brackets": {
@@ -13145,27 +13099,6 @@
"quick-lru": "^1.0.0"
}
},
"cosmiconfig": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz",
"integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==",
"dev": true,
"requires": {
"@types/parse-json": "^4.0.0",
"import-fresh": "^3.1.0",
"parse-json": "^5.0.0",
"path-type": "^4.0.0",
"yaml": "^1.7.2"
},
"dependencies": {
"path-type": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
"integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
"dev": true
}
}
},
"dir-glob": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz",
+20 -20
View File
@@ -26,10 +26,10 @@
"@semantic-release/npm": "^7.0.0",
"@semantic-release/release-notes-generator": "^9.0.0",
"aggregate-error": "^3.0.0",
"cosmiconfig": "^7.0.0",
"cosmiconfig": "^6.0.0",
"debug": "^4.0.0",
"env-ci": "^5.0.0",
"execa": "^5.0.0",
"execa": "^4.0.0",
"figures": "^3.0.0",
"find-versions": "^4.0.0",
"get-stream": "^5.0.0",
@@ -50,24 +50,24 @@
"yargs": "^16.2.0"
},
"devDependencies": {
"ava": "3.13.0",
"clear-module": "4.1.1",
"codecov": "3.8.1",
"delay": "4.4.0",
"dockerode": "3.2.1",
"file-url": "3.0.0",
"fs-extra": "9.0.1",
"got": "11.8.0",
"js-yaml": "3.14.0",
"mockserver-client": "5.11.2",
"nock": "12.0.3",
"nyc": "15.1.0",
"p-retry": "4.2.0",
"proxyquire": "2.1.3",
"sinon": "9.2.1",
"stream-buffers": "3.0.2",
"tempy": "0.5.0",
"xo": "0.29.1"
"ava": "^3.1.0",
"clear-module": "^4.0.0",
"codecov": "^3.0.0",
"delay": "^4.0.0",
"dockerode": "^3.0.0",
"file-url": "^3.0.0",
"fs-extra": "^9.0.0",
"got": "^11.0.0",
"js-yaml": "^3.10.0",
"mockserver-client": "^5.1.1",
"nock": "^12.0.0",
"nyc": "^15.0.0",
"p-retry": "^4.0.0",
"proxyquire": "^2.0.0",
"sinon": "^9.0.0",
"stream-buffers": "^3.0.2",
"tempy": "^0.5.0",
"xo": "^0.29.0"
},
"engines": {
"node": ">=10.18"
+7 -8
View File
@@ -1,5 +1,5 @@
const path = require('path');
const test = require('ava');
const { serial: test } = require('ava');
const proxyquire = require('proxyquire');
const {escapeRegExp} = require('lodash');
const {writeJson, readJson} = require('fs-extra');
@@ -29,7 +29,11 @@ const npmRegistry = require('./helpers/npm-registry');
const requireNoCache = proxyquire.noPreserveCache();
// Environment variables used with semantic-release cli (similar to what a user would setup)
const {GITHUB_ACTION, GITHUB_TOKEN, ...processEnvWithoutGitHubActionsVariables} = process.env;
const {
GITHUB_ACTION,
GITHUB_TOKEN,
...processEnvWithoutGitHubActionsVariables
} = process.env
const env = {
...processEnvWithoutGitHubActionsVariables,
...npmRegistry.authEnv,
@@ -652,12 +656,7 @@ test('Hide sensitive environment variable values from the logs', async (t) => {
});
t.log('$ semantic-release');
const {stdout, stderr} = await execa(cli, [], {
env: {...env, MY_TOKEN: 'secret token'},
cwd,
reject: false,
extendEnv: false,
});
const {stdout, stderr} = await execa(cli, [], {env: {...env, MY_TOKEN: 'secret token'}, cwd, reject: false, extendEnv: false});
t.regex(stdout, new RegExp(`Console: Exposing token ${escapeRegExp(SECRET_REPLACEMENT)}`));
t.regex(stdout, new RegExp(`Log: Exposing token ${escapeRegExp(SECRET_REPLACEMENT)}`));