Unverified Commit 534d9c14 authored by Sebastian "Sebbie" Silbermann's avatar Sebastian "Sebbie" Silbermann Committed by GitHub

[16.2.x] Release pipeline updates (#95160)

Co-authored-by: 's avatarSteven <steven@ceriously.com>
parent 98941fc4
...@@ -3,9 +3,13 @@ name: build-and-deploy ...@@ -3,9 +3,13 @@ name: build-and-deploy
on: on:
push: push:
# Don't run when tags or graphite base branches are pushed # Don't run when graphite base branches are pushed
branches-ignore: branches-ignore:
- 'graphite-base/**' - 'graphite-base/**'
# Run on release tags so publishing is driven by the tag push rather than
# the release-commit branch push (see the deploy-target step).
tags:
- 'v*'
# we need the preview tarball for deploy tests # we need the preview tarball for deploy tests
pull_request: pull_request:
types: [opened, synchronize] types: [opened, synchronize]
...@@ -13,8 +17,11 @@ on: ...@@ -13,8 +17,11 @@ on:
concurrency: concurrency:
# Limit concurrent runs to 1 per PR, # Limit concurrent runs to 1 per PR,
# but allow concurrent runs on push if they potentially use different source code # but allow concurrent runs on push if they potentially use different source code.
group: ${{ github.event_name == 'pull_request' && format('{0}-pr-{1}', github.workflow, github.ref_name) || format('{0}-sha-{1}', github.workflow, github.sha) }} # The push group includes github.ref so that the branch push and tag push of
# the same release commit (same sha) don't share a group -- otherwise the
# skipped branch run could cancel the production tag run.
group: ${{ github.event_name == 'pull_request' && format('{0}-pr-{1}', github.workflow, github.ref_name) || format('{0}-{1}-{2}', github.workflow, github.ref, github.sha) }}
cancel-in-progress: true cancel-in-progress: true
env: env:
...@@ -66,26 +73,34 @@ jobs: ...@@ -66,26 +73,34 @@ jobs:
if [[ "$RELEASE_VERSION" == v* ]]; if [[ "$RELEASE_VERSION" == v* ]];
then then
echo "value=production" >> $GITHUB_OUTPUT if [[ "$GIT_REF" != refs/tags/* ]];
if [[ "$RELEASE_VERSION" == *-canary.* ]];
then then
RELEASE_ENVIRONMENT="release-canary" # The release commit reached a branch (e.g. its push to canary).
elif [[ "$RELEASE_VERSION" == *-beta.* ]]; # Publishing is driven by the tag push for that same commit, so
then # skip here to avoid a duplicate production build on the same sha.
RELEASE_ENVIRONMENT="release-beta" echo "value=skipped" >> $GITHUB_OUTPUT
elif [[ "$RELEASE_VERSION" == *-rc.* ]]; else
then echo "value=production" >> $GITHUB_OUTPUT
RELEASE_ENVIRONMENT="release-release-candidate" if [[ "$RELEASE_VERSION" == *-canary.* ]];
elif [[ "$RELEASE_VERSION" != *-* ]]; then
then RELEASE_ENVIRONMENT="release-canary"
RELEASE_ENVIRONMENT="release-stable" elif [[ "$RELEASE_VERSION" == *-beta.* ]];
fi then
if [[ -z "$RELEASE_ENVIRONMENT" ]]; RELEASE_ENVIRONMENT="release-beta"
then elif [[ "$RELEASE_VERSION" == *-rc.* ]];
echo "::error::Missing release environment for $RELEASE_VERSION" then
exit 1 RELEASE_ENVIRONMENT="release-release-candidate"
elif [[ "$RELEASE_VERSION" != *-* ]];
then
RELEASE_ENVIRONMENT="release-stable"
fi
if [[ -z "$RELEASE_ENVIRONMENT" ]];
then
echo "::error::Missing release environment for $RELEASE_VERSION"
exit 1
fi
echo "release_environment=$RELEASE_ENVIRONMENT" >> $GITHUB_OUTPUT
fi fi
echo "release_environment=$RELEASE_ENVIRONMENT" >> $GITHUB_OUTPUT
elif [ ''"${GIT_REF}"'' == 'refs/heads/next-16-2' ] elif [ ''"${GIT_REF}"'' == 'refs/heads/next-16-2' ]
then then
echo "value=staging" >> $GITHUB_OUTPUT echo "value=staging" >> $GITHUB_OUTPUT
...@@ -100,8 +115,10 @@ jobs: ...@@ -100,8 +115,10 @@ jobs:
fi fi
env: env:
GIT_REF: ${{ github.ref }} GIT_REF: ${{ github.ref }}
- name: Print deploy target - name: Print deploy plan
run: echo "Deploy target is '${{ steps.deploy-target.outputs.value }}'" run: |
echo "Deploy target is '${{ steps.deploy-target.outputs.value }}'"
echo "Release environment is '${{ steps.deploy-target.outputs.release_environment }}'"
build: build:
if: ${{ needs.deploy-target.outputs.value != 'skipped' }} if: ${{ needs.deploy-target.outputs.value != 'skipped' }}
...@@ -637,10 +654,18 @@ jobs: ...@@ -637,10 +654,18 @@ jobs:
repositories: next.js repositories: next.js
permission-contents: write permission-contents: write
- run: ./scripts/publish-native.js
- run: ./scripts/publish-release.js - run: ./scripts/publish-release.js
env: env:
RELEASE_GITHUB_TOKEN: ${{ steps.release-app-token.outputs.token }} RELEASE_GITHUB_TOKEN: ${{ steps.release-app-token.outputs.token }}
BAIL_ON_NATIVE_WASM_PUBLISH_FAILURE: ${{ vars.BAIL_ON_NATIVE_WASM_PUBLISH_FAILURE }}
- name: Upload pnpm publish summary
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: pnpm-publish-summary
path: pnpm-publish-summary.json
if-no-files-found: ignore
publish-turbopack-npm-packages: publish-turbopack-npm-packages:
# Matches the commit message written by turbopack/xtask/src/publish.rs:377 # Matches the commit message written by turbopack/xtask/src/publish.rs:377
......
...@@ -96,7 +96,7 @@ jobs: ...@@ -96,7 +96,7 @@ jobs:
run: echo "LATEST_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV run: echo "LATEST_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: Check if new commits since last tag - name: Check if new commits since last tag
if: ${{ github.event.inputs.releaseType != 'stable' && github.event.inputs.force != true }} if: ${{ github.event.inputs.releaseType != 'stable' && inputs.force != true }}
run: | run: |
if [ "$LATEST_TAG_COMMIT" = "$LATEST_COMMIT" ]; then if [ "$LATEST_TAG_COMMIT" = "$LATEST_COMMIT" ]; then
echo "No new commits. Exiting..." echo "No new commits. Exiting..."
......
...@@ -33,6 +33,6 @@ The type definitions are generated using the TypeScript [`tsc`](https://www.type ...@@ -33,6 +33,6 @@ The type definitions are generated using the TypeScript [`tsc`](https://www.type
If you are actively working on Rust code or you need to test out the most recent Rust code that hasn't been published as a canary yet, you can [install Rust](https://www.rust-lang.org/tools/install) and run `pnpm swc-build-native`. If you are actively working on Rust code or you need to test out the most recent Rust code that hasn't been published as a canary yet, you can [install Rust](https://www.rust-lang.org/tools/install) and run `pnpm swc-build-native`.
If you want to test out the wasm build locally, you will need to [install wasm-pack](https://rustwasm.github.io/wasm-pack/installer/). Run `pnpm --filter=@next/swc build-wasm --target <wasm_target>` to build and `node ./scripts/setup-wasm.mjs` to copy it into your `node_modules`. Run next with `NODE_OPTIONS='--no-addons'` to force it to use the wasm binary. If you want to test out the wasm build locally, you will need to [install wasm-pack](https://wasm-bindgen.github.io/wasm-pack/installer/). Run `pnpm --filter=@next/swc build-wasm --target <wasm_target>` to build and `node ./scripts/setup-wasm.mjs` to copy it into your `node_modules`. Run next with `NODE_OPTIONS='--no-addons'` to force it to use the wasm binary.
If you need to clean the project for any reason, use `pnpm clean`. If you need to clean the project for any reason, use `pnpm clean`.
...@@ -86,7 +86,6 @@ ...@@ -86,7 +86,6 @@
"types": "lerna run types --stream", "types": "lerna run types --stream",
"types:test-lib": "tsc --project test/lib/tsconfig.json", "types:test-lib": "tsc --project test/lib/tsconfig.json",
"check-precompiled": "./scripts/check-pre-compiled.sh", "check-precompiled": "./scripts/check-pre-compiled.sh",
"prepublishOnly": "turbo run build",
"lint-staged": "lint-staged", "lint-staged": "lint-staged",
"next-with-deps": "./scripts/next-with-deps.sh", "next-with-deps": "./scripts/next-with-deps.sh",
"next": "cross-env NEXT_PRIVATE_LOCAL_DEV=1 NEXT_TELEMETRY_DISABLED=1 NODE_OPTIONS=\"--trace-deprecation --enable-source-maps\" next", "next": "cross-env NEXT_PRIVATE_LOCAL_DEV=1 NEXT_TELEMETRY_DISABLED=1 NODE_OPTIONS=\"--trace-deprecation --enable-source-maps\" next",
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
"dev": "ncc build ./index.ts -w -o dist/", "dev": "ncc build ./index.ts -w -o dist/",
"prebuild": "node ../../scripts/rm.mjs dist", "prebuild": "node ../../scripts/rm.mjs dist",
"build": "ncc build ./index.ts -o ./dist/ --minify --no-cache --no-source-map-register", "build": "ncc build ./index.ts -o ./dist/ --minify --no-cache --no-source-map-register",
"prepublishOnly": "cd ../../ && turbo run build",
"lint-fix": "pnpm prettier -w --plugin prettier-plugin-tailwindcss 'templates/*-tw/{ts,js}/{app,pages}/**/*.{js,ts,tsx}'" "lint-fix": "pnpm prettier -w --plugin prettier-plugin-tailwindcss 'templates/*-tw/{ts,js}/{app,pages}/**/*.{js,ts,tsx}'"
}, },
"devDependencies": { "devDependencies": {
......
...@@ -39,8 +39,7 @@ ...@@ -39,8 +39,7 @@
"scripts": { "scripts": {
"dev": "pnpm build", "dev": "pnpm build",
"build": "swc -d dist src && pnpm types", "build": "swc -d dist src && pnpm types",
"types": "tsc --skipLibCheck --declaration --emitDeclarationOnly --esModuleInterop --declarationDir dist --rootDir src", "types": "tsc --skipLibCheck --declaration --emitDeclarationOnly --esModuleInterop --declarationDir dist --rootDir src"
"prepublishOnly": "cd ../../ && turbo run build"
}, },
"exports": { "exports": {
".": { ".": {
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
"scripts": { "scripts": {
"dev": "pnpm build", "dev": "pnpm build",
"build": "swc -d dist src && pnpm types", "build": "swc -d dist src && pnpm types",
"types": "tsc src/index.ts --skipLibCheck --declaration --emitDeclarationOnly --esModuleInterop --declarationDir dist", "types": "tsc src/index.ts --skipLibCheck --declaration --emitDeclarationOnly --esModuleInterop --declarationDir dist"
"prepublishOnly": "cd ../../ && turbo run build"
} }
} }
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"build": "node ../../scripts/rm.mjs dist && pnpm ncc-fontkit && tsc -d -p tsconfig.build.json", "build": "node ../../scripts/rm.mjs dist && pnpm ncc-fontkit && tsc -d -p tsconfig.build.json",
"prepublishOnly": "cd ../../ && turbo run build",
"dev": "pnpm ncc-fontkit && tsc -d -w -p tsconfig.json", "dev": "pnpm ncc-fontkit && tsc -d -w -p tsconfig.json",
"typescript": "tsec --noEmit -p tsconfig.json", "typescript": "tsec --noEmit -p tsconfig.json",
"ncc-fontkit": "ncc build ./fontkit.js --minify -o dist/fontkit" "ncc-fontkit": "ncc build ./fontkit.js --minify -o dist/fontkit"
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
], ],
"scripts": { "scripts": {
"build": "pnpm tsc -d -p tsconfig.json", "build": "pnpm tsc -d -p tsconfig.json",
"prepublishOnly": "cd ../../ && turbo run build",
"dev": "pnpm tsc -d -w -p tsconfig.json", "dev": "pnpm tsc -d -w -p tsconfig.json",
"test": "jest", "test": "jest",
"test:upgrade-fixture": "./scripts/test-upgrade-fixture.sh" "test:upgrade-fixture": "./scripts/test-upgrade-fixture.sh"
......
...@@ -25,8 +25,7 @@ ...@@ -25,8 +25,7 @@
"prebuild:source": "node ../../scripts/rm.mjs dist", "prebuild:source": "node ../../scripts/rm.mjs dist",
"types": "tsc --declaration --emitDeclarationOnly --declarationDir dist", "types": "tsc --declaration --emitDeclarationOnly --declarationDir dist",
"build:source": "ncc build ./index.ts -o ./dist/ --minify --no-cache --no-source-map-register", "build:source": "ncc build ./index.ts -o ./dist/ --minify --no-cache --no-source-map-register",
"build": "pnpm build:source && pnpm types", "build": "pnpm build:source && pnpm types"
"prepublishOnly": "cd ../../ && turbo run build"
}, },
"devDependencies": { "devDependencies": {
"@vercel/ncc": "0.34.0", "@vercel/ncc": "0.34.0",
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"build": "node ../../scripts/rm.mjs dist && tsc -d -p tsconfig.json", "build": "node ../../scripts/rm.mjs dist && tsc -d -p tsconfig.json",
"prepublishOnly": "cd ../../ && turbo run build",
"dev": "tsc -d -w -p tsconfig.json", "dev": "tsc -d -w -p tsconfig.json",
"typescript": "tsec --noEmit -p tsconfig.json" "typescript": "tsec --noEmit -p tsconfig.json"
}, },
......
...@@ -10,8 +10,7 @@ ...@@ -10,8 +10,7 @@
}, },
"scripts": { "scripts": {
"build": "microbundle -i src/index.js -o dist/polyfill-module.js -f iife --no-sourcemap --external none --no-pkg-main", "build": "microbundle -i src/index.js -o dist/polyfill-module.js -f iife --no-sourcemap --external none --no-pkg-main",
"dev": "pnpm build", "dev": "pnpm build"
"prepublishOnly": "cd ../../ && turbo run build"
}, },
"devDependencies": { "devDependencies": {
"microbundle": "0.15.0" "microbundle": "0.15.0"
......
...@@ -10,8 +10,7 @@ ...@@ -10,8 +10,7 @@
}, },
"scripts": { "scripts": {
"build": "microbundle -i src/index.js -o dist/polyfill-nomodule.js -f iife --no-sourcemap --external none --no-pkg-main", "build": "microbundle -i src/index.js -o dist/polyfill-nomodule.js -f iife --no-sourcemap --external none --no-pkg-main",
"dev": "pnpm build", "dev": "pnpm build"
"prepublishOnly": "cd ../../ && turbo run build"
}, },
"devDependencies": { "devDependencies": {
"core-js": "3.38.1", "core-js": "3.38.1",
......
...@@ -27,8 +27,7 @@ ...@@ -27,8 +27,7 @@
"release": "ncc build ./src/index.ts -o ./dist/ --minify --no-cache --no-source-map-register", "release": "ncc build ./src/index.ts -o ./dist/ --minify --no-cache --no-source-map-register",
"build": "pnpm release && pnpm types", "build": "pnpm release && pnpm types",
"test": "jest", "test": "jest",
"test:watch": "jest --watch", "test:watch": "jest --watch"
"prepublishOnly": "cd ../../ && turbo run build"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^29.5.0", "@types/jest": "^29.5.0",
......
...@@ -80,7 +80,6 @@ ...@@ -80,7 +80,6 @@
"scripts": { "scripts": {
"dev": "cross-env NEXT_SERVER_NO_MANGLE=1 taskr", "dev": "cross-env NEXT_SERVER_NO_MANGLE=1 taskr",
"build": "taskr release", "build": "taskr release",
"prepublishOnly": "cd ../../ && turbo run build",
"types": "tsc --project tsconfig.build.json --declaration --emitDeclarationOnly --stripInternal --declarationDir dist", "types": "tsc --project tsconfig.build.json --declaration --emitDeclarationOnly --stripInternal --declarationDir dist",
"typescript": "tsec --noEmit", "typescript": "tsec --noEmit",
"ncc-compiled": "taskr ncc", "ncc-compiled": "taskr ncc",
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"build": "node ../../scripts/rm.mjs dist && tsc -d -p tsconfig.json", "build": "node ../../scripts/rm.mjs dist && tsc -d -p tsconfig.json",
"prepublishOnly": "cd ../../ && turbo run build",
"dev": "tsc -d -w -p tsconfig.json" "dev": "tsc -d -w -p tsconfig.json"
}, },
"peerDependencies": { "peerDependencies": {
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"build": "node ../../scripts/rm.mjs dist && tsc -d -p tsconfig.json", "build": "node ../../scripts/rm.mjs dist && tsc -d -p tsconfig.json",
"prepublishOnly": "cd ../../ && turbo run build",
"dev": "tsc -d -w -p tsconfig.json", "dev": "tsc -d -w -p tsconfig.json",
"typescript": "tsec --noEmit -p tsconfig.json" "typescript": "tsec --noEmit -p tsconfig.json"
}, },
......
#!/usr/bin/env node
const path = require('path')
const execa = require('execa')
const { Sema } = require('async-sema')
const { readFile, readdir, writeFile, cp } = require('fs/promises')
const cwd = process.cwd()
;(async function () {
try {
const publishSema = new Sema(2)
let version = require('@next/swc/package.json').version
// Copy binaries to package folders, update version, and publish
let nativePackagesDir = path.join(cwd, 'crates/next-napi-bindings/npm')
let platforms = (await readdir(nativePackagesDir)).filter(
(name) => !name.startsWith('.')
)
await Promise.all(
platforms.map(async (platform) => {
await publishSema.acquire()
let output = ''
try {
let binaryName = `next-swc.${platform}.node`
await cp(
path.join(cwd, 'packages/next-swc/native', binaryName),
path.join(nativePackagesDir, platform, binaryName)
)
let pkg = JSON.parse(
await readFile(
path.join(nativePackagesDir, platform, 'package.json')
)
)
pkg.version = version
await writeFile(
path.join(nativePackagesDir, platform, 'package.json'),
JSON.stringify(pkg, null, 2)
)
const child = execa(
`npm`,
[
`publish`,
`${path.join(nativePackagesDir, platform)}`,
`--access`,
`public`,
...(version.includes('canary') ? ['--tag', 'canary'] : []),
],
{ stdio: 'inherit' }
)
const handleData = (type) => (chunk) => {
process[type].write(chunk)
output += chunk.toString()
}
child.stdout?.on('data', handleData('stdout'))
child.stderr?.on('data', handleData('stderr'))
await child
} catch (err) {
// don't block publishing other versions on single platform error
console.error(`Failed to publish`, platform, err)
if (
output.includes(
'cannot publish over the previously published versions'
)
) {
console.error('Ignoring already published error', platform, err)
} else {
// throw err
}
} finally {
publishSema.release()
}
})
)
// Update name/version of wasm packages and publish
const pkgDirectory = 'crates/wasm'
let wasmDir = path.join(cwd, pkgDirectory)
await Promise.all(
['web', 'nodejs'].map(async (wasmTarget) => {
await publishSema.acquire()
let wasmPkg = JSON.parse(
await readFile(path.join(wasmDir, `pkg-${wasmTarget}/package.json`))
)
wasmPkg.name = `@next/swc-wasm-${wasmTarget}`
wasmPkg.version = version
wasmPkg.repository = {
type: 'git',
url: 'https://github.com/vercel/next.js',
directory: pkgDirectory,
}
await writeFile(
path.join(wasmDir, `pkg-${wasmTarget}/package.json`),
JSON.stringify(wasmPkg, null, 2)
)
try {
await execa(
`npm`,
[
'publish',
`${path.join(wasmDir, `pkg-${wasmTarget}`)}`,
'--access',
'public',
...(version.includes('canary') ? ['--tag', 'canary'] : []),
],
{ stdio: 'inherit' }
)
} catch (err) {
// don't block publishing other versions on single platform error
console.error(`Failed to publish`, wasmTarget, err)
if (
err.message &&
err.message.includes(
'You cannot publish over the previously published versions'
)
) {
console.error('Ignoring already published error', wasmTarget)
} else {
// throw err
}
} finally {
publishSema.release()
}
})
)
// Update optional dependencies versions
let nextPkg = JSON.parse(
await readFile(path.join(cwd, 'packages/next/package.json'))
)
for (let platform of platforms) {
let optionalDependencies = nextPkg.optionalDependencies || {}
optionalDependencies['@next/swc-' + platform] = version
nextPkg.optionalDependencies = optionalDependencies
}
await writeFile(
path.join(path.join(cwd, 'packages/next/package.json')),
JSON.stringify(nextPkg, null, 2)
)
} catch (err) {
console.error(err)
process.exit(1)
}
})()
This diff is collapsed.
...@@ -19,6 +19,7 @@ async function main() { ...@@ -19,6 +19,7 @@ async function main() {
const isCanary = releaseType === 'canary' const isCanary = releaseType === 'canary'
const isReleaseCandidate = releaseType === 'release-candidate' const isReleaseCandidate = releaseType === 'release-candidate'
const isBeta = releaseType === 'beta' const isBeta = releaseType === 'beta'
const dryRun = args.includes('--dry-run')
if ( if (
releaseType !== 'stable' && releaseType !== 'stable' &&
...@@ -42,26 +43,32 @@ async function main() { ...@@ -42,26 +43,32 @@ async function main() {
const githubToken = getGitHubToken() const githubToken = getGitHubToken()
if (!githubToken) { if (dryRun) {
console.log(getGitHubTokenMissingMessage()) console.log(
return 'Dry run: keeping commits locally, skipping git push and GitHub release creation'
} )
} else {
const configStorePath = resolveFrom( if (!githubToken) {
path.join(process.cwd(), 'node_modules/release'), console.log(getGitHubTokenMissingMessage())
'configstore' return
) }
const ConfigStore = require(configStorePath)
const configStorePath = resolveFrom(
path.join(process.cwd(), 'node_modules/release'),
'configstore'
)
const ConfigStore = require(configStorePath)
const config = new ConfigStore('release') const config = new ConfigStore('release')
config.set('token', githubToken) config.set('token', githubToken)
await configureGitHubAuth(githubToken) await configureGitHubAuth(githubToken)
await verifyGitHubApiAccess( await verifyGitHubApiAccess(
githubToken, githubToken,
'/repos/vercel/next.js/releases?per_page=1', '/repos/vercel/next.js/releases?per_page=1',
'release lookup' 'release lookup'
) )
}
console.log(`Running pnpm release-${isCanary ? 'canary' : 'stable'}...`) console.log(`Running pnpm release-${isCanary ? 'canary' : 'stable'}...`)
const preleaseType = const preleaseType =
...@@ -87,24 +94,36 @@ async function main() { ...@@ -87,24 +94,36 @@ async function main() {
lernaArgs.push('--force-publish', '-y', '--no-push') lernaArgs.push('--force-publish', '-y', '--no-push')
if (dryRun) {
// So the dry-run can be exercised outside
// of the release branches lerna.json restricts in real publishes.
lernaArgs.push('--allow-branch', '**')
}
const child = execa('pnpm', lernaArgs, { const child = execa('pnpm', lernaArgs, {
stdio: 'inherit', stdio: 'inherit',
}) })
await child await child
await createGitHubReleaseCommit(githubToken) if (dryRun) {
console.log(
if (isCanary || isReleaseCandidate || isBeta) { 'Dry run: skipping GitHub-signed release commit and GitHub release creation'
const releaseChild = execa(
'pnpm',
['release', '--pre', '--skip-questions', '--show-url'],
{
stdio: 'inherit',
}
) )
} else {
await releaseChild await createGitHubReleaseCommit(githubToken)
if (isCanary || isReleaseCandidate || isBeta) {
const releaseChild = execa(
'pnpm',
['release', '--pre', '--skip-questions', '--show-url'],
{
stdio: 'inherit',
}
)
await releaseChild
}
} }
console.log('Release process is finished') console.log('Release process is finished')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment