From 4106a557731bd82c9a2a020768cba4d10bc992f2 Mon Sep 17 00:00:00 2001 From: Katerina Skroumpelou Date: Wed, 8 Oct 2025 13:41:56 +0300 Subject: [PATCH 1/2] chore(ci): release canary only on conventional commit --- scripts/release-canary.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scripts/release-canary.ts b/scripts/release-canary.ts index 332b4ad4..85decc8d 100644 --- a/scripts/release-canary.ts +++ b/scripts/release-canary.ts @@ -1,6 +1,21 @@ import { releaseVersion, releaseChangelog, releasePublish } from 'nx/release' import { execSync } from 'child_process' ;(async () => { + const { workspaceVersion: canaryCheckWorkspaceVersion } = await releaseVersion({ + verbose: true, + gitCommit: false, + stageChanges: false, + dryRun: true, // Just to check if there are any conventional commits that warrant a release + }) + + // If no version bump detected, exit early + if (!canaryCheckWorkspaceVersion || canaryCheckWorkspaceVersion === '0.0.0') { + console.log( + 'ℹ️ No conventional commits found that warrant a release. Skipping canary release.' + ) + process.exit(0) + } + const { workspaceVersion, projectsVersionData } = await releaseVersion({ verbose: true, gitCommit: false, From 3091b781a395cff7a3071814ffe8588f53542172 Mon Sep 17 00:00:00 2001 From: Katerina Skroumpelou Date: Wed, 8 Oct 2025 13:44:24 +0300 Subject: [PATCH 2/2] chore(ci): remove git stash because not needed --- scripts/release-canary.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/release-canary.ts b/scripts/release-canary.ts index 85decc8d..7fe18a8c 100644 --- a/scripts/release-canary.ts +++ b/scripts/release-canary.ts @@ -78,8 +78,5 @@ import { execSync } from 'child_process' console.log('⚠️ Continuing with release despite gotrue-js publish failure') } - execSync('git stash') - console.log('✅ All changes stashed.') - process.exit(Object.values(publishResult).every((result) => result.code === 0) ? 0 : 1) })()