Skip to content

Commit 027f5fb

Browse files
caio-pizzolsuperdoc-oss-port[bot]
authored andcommitted
fix(release): publish GitHub releases for stable versions only
Keeps the GitHub Releases page focused on stable package history by omitting the GitHub publishing plugin from `next` releases. Version calculation and prerelease distribution continue through Git tags and package registry dist-tags without creating a public release entry for every merge. - preserves prerelease Git tags and npm `next` publishing - keeps stable release notes, comments, and assets unchanged - stops packaging prerelease VS Code `.vsix` files that had no destination outside GitHub Releases - links Linear prerelease breadcrumbs to Git tags instead of missing Release pages Co-authored-by: Caio Pizzol <caio@superdoc.dev> Source-PR: #3818 Closes #3818 Ported-From-Source-Repo: superdoc/orbit Ported-From-Source-Commit: d0a89aab551b880070b8e6d8848689cda8e72285 Ported-Public-Prefix: superdoc/public
1 parent 7f2d1f9 commit 027f5fb

14 files changed

Lines changed: 160 additions & 155 deletions

File tree

.github/workflows/release-vscode-ext.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Stable releases are orchestrated centrally by release-stable.yml so that
33
# every stable release shares one concurrency slot and one git push lane.
44
# Note: VS Code Marketplace doesn't support semver prerelease versions, so
5-
# main pushes only build a .vsix and attach it to the GitHub release.
5+
# main pushes create prerelease tags without publishing a .vsix.
66
name: 📦 Release vscode-ext
77

88
on:

apps/cli/.releaserc.cjs

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,10 @@ const branches = [
3333

3434
const isPrerelease = branches.some((b) => typeof b === 'object' && b.name === branch && b.prerelease);
3535

36-
// stable -> main syncs (real merges) re-attribute prereleases to PRs already shipped on @latest.
37-
// Gate per-PR/issue success comments off on prereleases to avoid duplicate "shipped" comments.
38-
const shouldCommentOnRelease = !isPrerelease;
39-
// Linear release comments are the shipped-version breadcrumb inside Linear
40-
// itself, so keep them on for prereleases even while GitHub PR comments stay
41-
// gated separately.
36+
// GitHub Releases are stable-only; prerelease tags and package publishing still proceed.
37+
const shouldPublishGitHubRelease = Boolean(branch) && !isPrerelease;
38+
// Linear release comments remain the shipped-version breadcrumb, so
39+
// prereleases link to their Git tags when no GitHub Release exists.
4240
const shouldCommentOnLinearRelease = true;
4341

4442
// Use AI-powered notes for stable releases, conventional generator for prereleases
@@ -89,13 +87,14 @@ config.plugins.push([
8987
},
9088
]);
9189

92-
config.plugins.push([
93-
'@semantic-release/github',
94-
{
95-
successComment:
96-
':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **superdoc-cli** v${nextRelease.version}\n\nThe release is available on [GitHub release](${releases.find(release => release.pluginName === "@semantic-release/github").url})',
97-
successCommentCondition: shouldCommentOnRelease ? undefined : false,
98-
},
99-
]);
90+
if (shouldPublishGitHubRelease) {
91+
config.plugins.push([
92+
'@semantic-release/github',
93+
{
94+
successComment:
95+
':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **superdoc-cli** v${nextRelease.version}\n\nThe release is available on [GitHub release](${releases.find(release => release.pluginName === "@semantic-release/github").url})',
96+
},
97+
]);
98+
}
10099

101100
module.exports = config;

apps/create/.releaserc.cjs

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@ const branches = [
1313

1414
const isPrerelease = branches.some((b) => typeof b === 'object' && b.name === branch && b.prerelease);
1515

16-
// stable -> main syncs (real merges) re-attribute prereleases to PRs already shipped on @latest.
17-
// Gate per-PR/issue success comments off on prereleases to avoid duplicate "shipped" comments.
18-
const shouldCommentOnRelease = !isPrerelease;
19-
// Linear release comments are the shipped-version breadcrumb inside Linear
20-
// itself, so keep them on for prereleases even while GitHub PR comments stay
21-
// gated separately.
16+
// GitHub Releases are stable-only; prerelease tags and package publishing still proceed.
17+
const shouldPublishGitHubRelease = Boolean(branch) && !isPrerelease;
18+
// Linear release comments remain the shipped-version breadcrumb, so
19+
// prereleases link to their Git tags when no GitHub Release exists.
2220
const shouldCommentOnLinearRelease = true;
2321

2422
const notesPlugin = isPrerelease ? createReleaseNotesGenerator() : ['semantic-release-ai-notes', { style: 'concise' }];
@@ -49,13 +47,14 @@ config.plugins.push([
4947
},
5048
]);
5149

52-
config.plugins.push([
53-
'@semantic-release/github',
54-
{
55-
successComment:
56-
':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **@superdoc-dev/create** v${nextRelease.version}\n\nThe release is available on [GitHub release](${releases.find(release => release.pluginName === "@semantic-release/github").url})',
57-
successCommentCondition: shouldCommentOnRelease ? undefined : false,
58-
},
59-
]);
50+
if (shouldPublishGitHubRelease) {
51+
config.plugins.push([
52+
'@semantic-release/github',
53+
{
54+
successComment:
55+
':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **@superdoc-dev/create** v${nextRelease.version}\n\nThe release is available on [GitHub release](${releases.find(release => release.pluginName === "@semantic-release/github").url})',
56+
},
57+
]);
58+
}
6059

6160
module.exports = config;

apps/mcp/.releaserc.cjs

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,10 @@ const branches = [
3737

3838
const isPrerelease = branches.some((b) => typeof b === 'object' && b.name === branch && b.prerelease);
3939

40-
// stable -> main syncs (real merges) re-attribute prereleases to PRs already shipped on @latest.
41-
// Gate per-PR/issue success comments off on prereleases to avoid duplicate "shipped" comments.
42-
const shouldCommentOnRelease = !isPrerelease;
43-
// Linear release comments are the shipped-version breadcrumb inside Linear
44-
// itself, so keep them on for prereleases even while GitHub PR comments stay
45-
// gated separately.
40+
// GitHub Releases are stable-only; prerelease tags and package publishing still proceed.
41+
const shouldPublishGitHubRelease = Boolean(branch) && !isPrerelease;
42+
// Linear release comments remain the shipped-version breadcrumb, so
43+
// prereleases link to their Git tags when no GitHub Release exists.
4644
const shouldCommentOnLinearRelease = true;
4745

4846
// Use AI-powered notes for stable releases, conventional generator for prereleases
@@ -92,13 +90,14 @@ config.plugins.push([
9290
},
9391
]);
9492

95-
config.plugins.push([
96-
'@semantic-release/github',
97-
{
98-
successComment:
99-
':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **@superdoc-dev/mcp** v${nextRelease.version}\n\nThe release is available on [GitHub release](${releases.find(release => release.pluginName === "@semantic-release/github").url})',
100-
successCommentCondition: shouldCommentOnRelease ? undefined : false,
101-
},
102-
]);
93+
if (shouldPublishGitHubRelease) {
94+
config.plugins.push([
95+
'@semantic-release/github',
96+
{
97+
successComment:
98+
':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **@superdoc-dev/mcp** v${nextRelease.version}\n\nThe release is available on [GitHub release](${releases.find(release => release.pluginName === "@semantic-release/github").url})',
99+
},
100+
]);
101+
}
103102

104103
module.exports = config;

apps/vscode-ext/.releaserc.cjs

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,10 @@ const branches = [
3333

3434
const isPrerelease = branches.some((b) => typeof b === 'object' && b.name === branch && b.prerelease);
3535

36-
// stable -> main syncs (real merges) re-attribute prereleases to PRs already shipped on @latest.
37-
// Gate per-PR/issue success comments off on prereleases to avoid duplicate "shipped" comments.
38-
const shouldCommentOnRelease = !isPrerelease;
39-
// Linear release comments are the shipped-version breadcrumb inside Linear
40-
// itself, so keep them on for prereleases even while GitHub PR comments stay
41-
// gated separately.
36+
// GitHub Releases are stable-only; prerelease tags still proceed on main.
37+
const shouldPublishGitHubRelease = Boolean(branch) && !isPrerelease;
38+
// Linear release comments remain the shipped-version breadcrumb, so
39+
// prereleases link to their Git tags when no GitHub Release exists.
4240
const shouldCommentOnLinearRelease = true;
4341

4442
// Use AI-powered notes for stable releases, conventional generator for prereleases
@@ -65,16 +63,9 @@ const config = {
6563
],
6664
};
6765

68-
// VS Code Marketplace doesn't support semver prerelease versions (e.g., 0.0.1-next.1)
69-
// Only publish stable releases to marketplace; prereleases get GitHub release with .vsix attached
70-
if (isPrerelease) {
71-
config.plugins.push([
72-
'@semantic-release/exec',
73-
{
74-
prepareCmd: 'pnpm run package', // Creates .vsix file only
75-
},
76-
]);
77-
} else {
66+
// VS Code Marketplace doesn't support semver prerelease versions, so only
67+
// stable releases build and publish a .vsix.
68+
if (!isPrerelease) {
7869
config.plugins.push([
7970
'@semantic-release/exec',
8071
{
@@ -103,14 +94,15 @@ config.plugins.push([
10394
},
10495
]);
10596

106-
config.plugins.push([
107-
'@semantic-release/github',
108-
{
109-
assets: [{ path: '*.vsix', label: 'VS Code Extension' }],
110-
successComment:
111-
':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **vscode-ext** v${nextRelease.version}',
112-
successCommentCondition: shouldCommentOnRelease ? undefined : false,
113-
},
114-
]);
97+
if (shouldPublishGitHubRelease) {
98+
config.plugins.push([
99+
'@semantic-release/github',
100+
{
101+
assets: [{ path: '*.vsix', label: 'VS Code Extension' }],
102+
successComment:
103+
':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **vscode-ext** v${nextRelease.version}',
104+
},
105+
]);
106+
}
115107

116108
module.exports = config;

packages/esign/.releaserc.cjs

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,10 @@ const branches = [
2121

2222
const isPrerelease = branches.some((b) => typeof b === 'object' && b.name === branch && b.prerelease);
2323

24-
// stable -> main syncs (real merges) re-attribute prereleases to PRs already shipped on @latest.
25-
// Gate per-PR/issue success comments off on prereleases to avoid duplicate "shipped" comments.
26-
const shouldCommentOnRelease = !isPrerelease;
27-
// Linear release comments are the shipped-version breadcrumb inside Linear
28-
// itself, so keep them on for prereleases even while GitHub PR comments stay
29-
// gated separately.
24+
// GitHub Releases are stable-only; prerelease tags and package publishing still proceed.
25+
const shouldPublishGitHubRelease = Boolean(branch) && !isPrerelease;
26+
// Linear release comments remain the shipped-version breadcrumb, so
27+
// prereleases link to their Git tags when no GitHub Release exists.
3028
const shouldCommentOnLinearRelease = true;
3129

3230
// Use AI-powered notes for stable releases, conventional generator for prereleases
@@ -64,13 +62,14 @@ config.plugins.push([
6462
},
6563
]);
6664

67-
config.plugins.push([
68-
'@semantic-release/github',
69-
{
70-
successComment:
71-
':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **esign** v${nextRelease.version}\n\nThe release is available on [GitHub release](https://github.com/superdoc-dev/superdoc/releases/tag/${nextRelease.gitTag})',
72-
successCommentCondition: shouldCommentOnRelease ? undefined : false,
73-
},
74-
]);
65+
if (shouldPublishGitHubRelease) {
66+
config.plugins.push([
67+
'@semantic-release/github',
68+
{
69+
successComment:
70+
':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **esign** v${nextRelease.version}\n\nThe release is available on [GitHub release](https://github.com/superdoc-dev/superdoc/releases/tag/${nextRelease.gitTag})',
71+
},
72+
]);
73+
}
7574

7675
module.exports = config;

packages/fonts/.releaserc.cjs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ const branches = [
1414
];
1515

1616
const isPrerelease = branches.some((b) => typeof b === 'object' && b.name === branch && b.prerelease);
17-
const shouldCommentOnRelease = !isPrerelease;
17+
// GitHub Releases are stable-only; prerelease tags and package publishing still proceed.
18+
const shouldPublishGitHubRelease = Boolean(branch) && !isPrerelease;
1819
const shouldCommentOnLinearRelease = true;
1920
const notesPlugin = isPrerelease ? createReleaseNotesGenerator() : ['semantic-release-ai-notes', { style: 'concise' }];
2021

@@ -49,13 +50,14 @@ config.plugins.push([
4950
},
5051
]);
5152

52-
config.plugins.push([
53-
'@semantic-release/github',
54-
{
55-
successComment:
56-
':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **@superdoc-dev/fonts** v${nextRelease.version}\n\nThe release is available on [GitHub release](https://github.com/superdoc-dev/superdoc/releases/tag/${nextRelease.gitTag})',
57-
successCommentCondition: shouldCommentOnRelease ? undefined : false,
58-
},
59-
]);
53+
if (shouldPublishGitHubRelease) {
54+
config.plugins.push([
55+
'@semantic-release/github',
56+
{
57+
successComment:
58+
':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **@superdoc-dev/fonts** v${nextRelease.version}\n\nThe release is available on [GitHub release](https://github.com/superdoc-dev/superdoc/releases/tag/${nextRelease.gitTag})',
59+
},
60+
]);
61+
}
6062

6163
module.exports = config;

packages/react/.releaserc.cjs

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,10 @@ const branches = [
3333

3434
const isPrerelease = branches.some((b) => typeof b === 'object' && b.name === branch && b.prerelease);
3535

36-
// stable -> main syncs (real merges) re-attribute prereleases to PRs already shipped on @latest.
37-
// Gate per-PR/issue success comments off on prereleases to avoid duplicate "shipped" comments.
38-
const shouldCommentOnRelease = !isPrerelease;
39-
// Linear release comments are the shipped-version breadcrumb inside Linear
40-
// itself, so keep them on for prereleases even while GitHub PR comments stay
41-
// gated separately.
36+
// GitHub Releases are stable-only; prerelease tags and package publishing still proceed.
37+
const shouldPublishGitHubRelease = Boolean(branch) && !isPrerelease;
38+
// Linear release comments remain the shipped-version breadcrumb, so
39+
// prereleases link to their Git tags when no GitHub Release exists.
4240
const shouldCommentOnLinearRelease = true;
4341

4442
// Use AI-powered notes for stable releases, conventional generator for prereleases
@@ -82,13 +80,14 @@ config.plugins.push([
8280
{ teamKeys: ['SD'], addComment: shouldCommentOnLinearRelease, packageName: 'react' },
8381
]);
8482

85-
config.plugins.push([
86-
'@semantic-release/github',
87-
{
88-
successComment:
89-
':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **@superdoc-dev/react** v${nextRelease.version}\n\nThe release is available on [GitHub release](https://github.com/superdoc-dev/superdoc/releases/tag/${nextRelease.gitTag})',
90-
successCommentCondition: shouldCommentOnRelease ? undefined : false,
91-
},
92-
]);
83+
if (shouldPublishGitHubRelease) {
84+
config.plugins.push([
85+
'@semantic-release/github',
86+
{
87+
successComment:
88+
':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **@superdoc-dev/react** v${nextRelease.version}\n\nThe release is available on [GitHub release](https://github.com/superdoc-dev/superdoc/releases/tag/${nextRelease.gitTag})',
89+
},
90+
]);
91+
}
9392

9493
module.exports = config;

packages/sdk/.releaserc.cjs

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,10 @@ const branches = [
3333

3434
const isPrerelease = branches.some((b) => typeof b === 'object' && b.name === branch && b.prerelease);
3535

36-
// stable -> main syncs (real merges) re-attribute prereleases to PRs already shipped on @latest.
37-
// Gate per-PR/issue success comments off on prereleases to avoid duplicate "shipped" comments.
38-
const shouldCommentOnRelease = !isPrerelease;
39-
// Linear release comments are the shipped-version breadcrumb inside Linear
40-
// itself, so keep them on for prereleases even while GitHub PR comments stay
41-
// gated separately.
36+
// GitHub Releases are stable-only; prerelease tags and package publishing still proceed.
37+
const shouldPublishGitHubRelease = Boolean(branch) && !isPrerelease;
38+
// Linear release comments remain the shipped-version breadcrumb, so
39+
// prereleases link to their Git tags when no GitHub Release exists.
4240
const shouldCommentOnLinearRelease = true;
4341

4442
// Use AI-powered notes for stable releases, conventional generator for prereleases
@@ -116,13 +114,14 @@ config.plugins.push([
116114
},
117115
]);
118116

119-
config.plugins.push([
120-
'@semantic-release/github',
121-
{
122-
successComment:
123-
':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **superdoc-sdk** v${nextRelease.version}',
124-
successCommentCondition: shouldCommentOnRelease ? undefined : false,
125-
},
126-
]);
117+
if (shouldPublishGitHubRelease) {
118+
config.plugins.push([
119+
'@semantic-release/github',
120+
{
121+
successComment:
122+
':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **superdoc-sdk** v${nextRelease.version}',
123+
},
124+
]);
125+
}
127126

128127
module.exports = config;

packages/superdoc/.releaserc.cjs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,10 @@ const branches = [
6161

6262
const isPrerelease = branches.some((b) => typeof b === 'object' && b.name === branch && b.prerelease);
6363

64-
// stable -> main syncs (real merges) re-attribute prereleases to PRs already shipped on @latest.
65-
// Gate per-PR/issue success comments off on prereleases to avoid duplicate "shipped" comments.
66-
const shouldCommentOnRelease = !isPrerelease;
67-
// Linear release comments are the shipped-version breadcrumb inside Linear
68-
// itself, so keep them on for prereleases even while GitHub PR comments stay
69-
// gated separately.
64+
// GitHub Releases are stable-only; prerelease tags and package publishing still proceed.
65+
const shouldPublishGitHubRelease = !isLocalPreview && Boolean(branch) && !isPrerelease;
66+
// Linear release comments remain the shipped-version breadcrumb, so
67+
// prereleases link to their Git tags when no GitHub Release exists.
7068
const shouldCommentOnLinearRelease = true;
7169

7270
// Use AI-powered notes for stable releases, conventional generator for prereleases
@@ -120,13 +118,12 @@ if (!isLocalPreview) {
120118
}
121119

122120
// GitHub plugin comes last
123-
if (!isLocalPreview) {
121+
if (shouldPublishGitHubRelease) {
124122
config.plugins.push([
125123
'@semantic-release/github',
126124
{
127125
successComment:
128126
':tada: This ${issue.pull_request ? "PR" : "issue"} is included in **superdoc** v${nextRelease.version}\n\nThe release is available on [GitHub release](https://github.com/superdoc-dev/superdoc/releases/tag/${nextRelease.gitTag})',
129-
successCommentCondition: shouldCommentOnRelease ? undefined : false,
130127
},
131128
]);
132129
}

0 commit comments

Comments
 (0)