Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
tags:
- "v*.*.*"
- "!v*-nightly.*"
schedule:
- cron: "0 */3 * * *"
workflow_dispatch:
Expand Down Expand Up @@ -41,7 +42,7 @@ jobs:
- id: check
name: Compare HEAD to last nightly tag
run: |
last_nightly_tag=$(git tag --list 'nightly-v*' --sort=-creatordate | head -n 1)
last_nightly_tag=$(git tag --list 'v*-nightly.*' 'nightly-v*' --sort=-creatordate | head -n 1)
if [[ -z "$last_nightly_tag" ]]; then
echo "No previous nightly tag found. Proceeding with release."
echo "has_changes=true" >> "$GITHUB_OUTPUT"
Expand Down
2 changes: 1 addition & 1 deletion scripts/release-smoke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ try {
);
assertContains(
nightlyReleaseMetadata,
"tag=nightly-v9.9.10-nightly.20260413.321",
"tag=v9.9.10-nightly.20260413.321",
"Expected nightly metadata to contain the derived nightly tag.",
);
assertContains(
Expand Down
2 changes: 1 addition & 1 deletion scripts/resolve-nightly-release.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ it("derives nightly metadata including the short commit sha in the release name"
{
baseVersion: "9.9.10",
version: "9.9.10-nightly.20260413.321",
tag: "nightly-v9.9.10-nightly.20260413.321",
tag: "v9.9.10-nightly.20260413.321",
name: "T3 Code Nightly 9.9.10-nightly.20260413.321 (abcdef123456)",
shortSha: "abcdef123456",
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/resolve-nightly-release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const resolveNightlyReleaseMetadata = (
return {
baseVersion,
version,
tag: `nightly-v${version}`,
tag: `v${version}`,
name: `T3 Code Nightly ${version} (${shortSha})`,
shortSha,
};
Expand Down
12 changes: 10 additions & 2 deletions scripts/resolve-previous-release-tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,17 @@ const parseStableTag = (tag: string): StableVersion | undefined => {
const [, major, minor, patch, prerelease] = match;
if (!major || !minor || !patch) return undefined;

const prereleaseIdentifiers = prerelease ? prerelease.split(".") : [];
// Nightly tags also start with `v` and carry a `nightly.*` prerelease
// identifier. They must not be considered stable candidates when resolving
// the previous stable tag.
if (prereleaseIdentifiers[0] === "nightly") return undefined;

return {
major: Number(major),
minor: Number(minor),
patch: Number(patch),
prerelease: prerelease ? prerelease.split(".") : [],
prerelease: prereleaseIdentifiers,
};
};

Expand All @@ -92,7 +98,9 @@ const compareNightlyVersions = (left: NightlyVersion, right: NightlyVersion): nu
};

const parseNightlyTag = (tag: string): NightlyVersion | undefined => {
const match = /^nightly-v(\d+)\.(\d+)\.(\d+)-nightly\.(\d{8})\.(\d+)$/.exec(tag);
// Accept both the current `v<semver>` format and the legacy `nightly-v<semver>`
// format so release note diffs keep working across the tag-format transition.
const match = /^(?:nightly-)?v(\d+)\.(\d+)\.(\d+)-nightly\.(\d{8})\.(\d+)$/.exec(tag);
if (!match) return undefined;

const [, major, minor, patch, date, runNumber] = match;
Expand Down
Loading