From 1ce58ddd672ea67631bc52e85be32962b24df6ae Mon Sep 17 00:00:00 2001 From: lauren Date: Fri, 18 Oct 2024 00:20:14 -0400 Subject: [PATCH 1/2] [ci] Don't auto push to latest tag (#31284) By default let's stop pushing to the latest tag now that we have a non-experimental release. --- compiler/scripts/release/publish.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/compiler/scripts/release/publish.js b/compiler/scripts/release/publish.js index a7ad1a7254..aa61366e8b 100755 --- a/compiler/scripts/release/publish.js +++ b/compiler/scripts/release/publish.js @@ -166,14 +166,7 @@ async function main() { try { await spawnHelper( 'npm', - [ - 'publish', - ...opts, - '--registry=https://registry.npmjs.org', - // For now, since the compiler is experimental only, to simplify installation we push - // to the `latest` tag - '--tag=latest', - ], + ['publish', ...opts, '--registry=https://registry.npmjs.org'], { cwd: pkgDir, stdio: 'inherit', From b503184ac50a5341b829f8bc3ef797224fac68c3 Mon Sep 17 00:00:00 2001 From: lauren Date: Fri, 18 Oct 2024 13:11:49 -0400 Subject: [PATCH 2/2] [ci:compiler] Only add latest tag to non-experimental It turns out npm sets the latest tag by default so simply removing it didn't change the previous behavior. The `latest` tag is typically used for stable release versions, and other tags for unstable versions such as prereleases. Since the compiler is still in prerelease, let's set the latest tag only for non-experimental releases to help signal which version is the safest to try out. --- compiler/scripts/release/publish.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/compiler/scripts/release/publish.js b/compiler/scripts/release/publish.js index aa61366e8b..64d5b78e75 100755 --- a/compiler/scripts/release/publish.js +++ b/compiler/scripts/release/publish.js @@ -163,6 +163,21 @@ async function main() { if (otp != null) { opts.push(`--otp=${otp}`); } + /** + * Typically, the `latest` tag is reserved for stable package versions. Since the the compiler + * is still pre-release, until we have a stable release let's only add the + * `latest` tag to non-experimental releases. + * + * `latest` is added by default, so we only override it for experimental releases so that + * those don't get the `latest` tag. + * + * TODO: Update this when we have a stable release. + */ + if (argv.tag === 'experimental') { + opts.push('--tag=experimental'), + } else { + opts.push('--tag=latest'), + } try { await spawnHelper( 'npm',