diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cce391b65ed6c..84c40e7745106 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,7 @@ jobs: if: | github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || - startsWith(github.head_ref, 'release/v') + startsWith(github.head_ref, 'release/') runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -29,7 +29,7 @@ jobs: if: | github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || - startsWith(github.head_ref, 'release/v') + startsWith(github.head_ref, 'release/') strategy: fail-fast: false matrix: @@ -75,13 +75,13 @@ jobs: node bin/npm-cli.js install -g $RUNNER_TEMP/npm-$NPM_VERSION.tgz node bin/npm-cli.js install -w smoke-tests --ignore-scripts --no-audit --no-fund rm -rf {lib,bin,index.js} - SMOKE_TEST_NPM=1 npm test -w smoke-tests --ignore-scripts + SMOKE_PUBLISH_NPM=1 npm test -w smoke-tests --ignore-scripts test-all: if: | github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || - startsWith(github.head_ref, 'release/v') + startsWith(github.head_ref, 'release/') strategy: fail-fast: false matrix: diff --git a/smoke-tests/test/index.js b/smoke-tests/test/index.js index 32a422a25bc12..e5b2b2024874e 100644 --- a/smoke-tests/test/index.js +++ b/smoke-tests/test/index.js @@ -6,13 +6,13 @@ const rimraf = require('rimraf') const which = require('which').sync const { start, stop, registry } = require('../lib/server.js') -const { SMOKE_TEST_NPM, CI, PATH } = process.env +const { SMOKE_PUBLISH_NPM, CI, PATH } = process.env const log = CI ? console.error : () => {} const cwd = resolve(__dirname, '..', '..') const npmCli = join('bin', 'npm-cli.js') -const execArgv = SMOKE_TEST_NPM ? ['npm'] : [process.execPath, join(cwd, npmCli)] -const npmDir = SMOKE_TEST_NPM ? realpathSync(which('npm')).replace(sep + npmCli, '') : cwd +const execArgv = SMOKE_PUBLISH_NPM ? ['npm'] : [process.execPath, join(cwd, npmCli)] +const npmDir = SMOKE_PUBLISH_NPM ? realpathSync(which('npm')).replace(sep + npmCli, '') : cwd const normalizePath = path => path.replace(/[A-Z]:/, '').replace(/\\/g, '/') @@ -156,7 +156,7 @@ t.test('npm init', async t => { t.test('npm --version', async t => { const v = await exec('--version') - if (SMOKE_TEST_NPM) { + if (SMOKE_PUBLISH_NPM) { t.match(v.trim(), /-[0-9a-f]{40}\.\d$/, 'must have a git version') } else { t.skip('not checking version')