Skip to content

Commit 62c53d5

Browse files
committed
fix: stable releases
1 parent c9b8e31 commit 62c53d5

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

scripts/release-stable.mjs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function setOutput(name, value) {
3232
run("git fetch origin prod dev");
3333
run('git config user.name "github-actions[bot]"');
3434
run('git config user.email "github-actions[bot]@users.noreply.github.com"');
35-
run("git checkout -B changeset-release/prod origin/dev");
35+
run("git checkout -B changeset-release/prod origin/prod");
3636

3737
const preStatePath = path.join(changesetDir, "pre.json");
3838

@@ -77,4 +77,15 @@ if (!existingPr) {
7777
run('gh pr create --title "Version Packages (Stable)" --body "" --base prod --head changeset-release/prod');
7878
}
7979

80+
const tag = `v${version}`;
81+
const remoteTag = output(`git ls-remote --tags origin ${tag}`);
82+
83+
if (remoteTag) {
84+
console.info(`Tag ${tag} already exists, skipping`);
85+
} else {
86+
run(`git tag ${tag}`);
87+
run(`git push origin ${tag}`);
88+
run(`gh release create ${tag} --title ${tag} --generate-notes`);
89+
}
90+
8091
setOutput("release_ready", "false");

0 commit comments

Comments
 (0)