From 4c54da77fb57787ae85c521e04c861404a37eba2 Mon Sep 17 00:00:00 2001 From: lauren Date: Mon, 21 Apr 2025 14:56:51 -0400 Subject: [PATCH 1/2] [ci] Change to string type (#32980) to no one's surprise, the `number` type appears to be cursed in GH actions for workflow dispatch. switch to string --- .github/workflows/compiler_prereleases.yml | 2 +- .github/workflows/compiler_prereleases_manual.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/compiler_prereleases.yml b/.github/workflows/compiler_prereleases.yml index fbdeab220c..bd6d003a4c 100644 --- a/.github/workflows/compiler_prereleases.yml +++ b/.github/workflows/compiler_prereleases.yml @@ -18,7 +18,7 @@ on: type: string tag_version: required: false - type: number + type: string secrets: NPM_TOKEN: required: true diff --git a/.github/workflows/compiler_prereleases_manual.yml b/.github/workflows/compiler_prereleases_manual.yml index a840065548..268b8f24f4 100644 --- a/.github/workflows/compiler_prereleases_manual.yml +++ b/.github/workflows/compiler_prereleases_manual.yml @@ -16,7 +16,7 @@ on: type: string tag_version: required: false - type: number + type: string permissions: {} From 6f60005589ca1769fb47833641c4e8c2255182fb Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Mon, 21 Apr 2025 15:02:36 -0400 Subject: [PATCH 2/2] [compiler] Only append hash and date for experimental releases No need to append these for non experimental/beta releases. --- compiler/scripts/release/publish.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/compiler/scripts/release/publish.js b/compiler/scripts/release/publish.js index 713e23dcef..2a7e74e9a5 100755 --- a/compiler/scripts/release/publish.js +++ b/compiler/scripts/release/publish.js @@ -139,10 +139,14 @@ async function main() { files: {exclude: ['.DS_Store']}, }); const truncatedHash = hash.slice(0, 7); - const newVersion = + let newVersion = argv.tagVersion == null || argv.tagVersion === '' - ? `${argv.versionName}-${argv.tag}-${truncatedHash}-${dateString}` - : `${argv.versionName}-${argv.tag}.${argv.tagVersion}-${truncatedHash}-${dateString}`; + ? `${argv.versionName}-${argv.tag}` + : `${argv.versionName}-${argv.tag}.${argv.tagVersion}`; + newVersion = + argv.tag === 'experimental' || argv.tag === 'beta' + ? `${newVersion}-${truncatedHash}-${dateString}` + : newVersion; for (const pkgName of pkgNames) { const pkgDir = path.resolve(__dirname, `../../packages/${pkgName}`);