Skip to content

Commit a44e1d2

Browse files
committed
fix(ci): pin semantic-release tooling and restore v0.95.0 notes
1 parent 5bfaf0e commit a44e1d2

5 files changed

Lines changed: 223 additions & 87 deletions

File tree

.releaserc.json

Lines changed: 0 additions & 65 deletions
This file was deleted.

.releaserc.mjs

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
//
3+
// semantic-release configuration.
4+
//
5+
// This is an ESM (.mjs) config rather than .releaserc.json because the
6+
// release-notes-generator needs a `writerOpts.transform` function to strip git
7+
// trailers (e.g. `Signed-off-by:`) that the conventional-commits parser folds
8+
// into `BREAKING CHANGE` notes. JSON cannot carry functions.
9+
//
10+
// This config defaults to a dry run as a fail-safe: the publishing plugins
11+
// (@semantic-release/github, @semantic-release/git) and the verify/publish exec
12+
// commands are only included when RELEASE_DRY_RUN=false. ci/release/run.sh opts
13+
// in to a real release that way; every other invocation stays harmless.
14+
15+
import { createRequire } from "node:module";
16+
import { pathToFileURL } from "node:url";
17+
18+
const loadPreset = async () => {
19+
try {
20+
return (await import("conventional-changelog-conventionalcommits")).default;
21+
} catch {
22+
const require = createRequire(pathToFileURL(process.argv[1]));
23+
const resolved = pathToFileURL(
24+
require.resolve("conventional-changelog-conventionalcommits")
25+
).href;
26+
return (await import(resolved)).default;
27+
}
28+
};
29+
const conventionalcommits = await loadPreset();
30+
31+
const TRAILER_KEYS = [
32+
"Signed-off-by",
33+
"Co-authored-by",
34+
"Co-developed-by",
35+
"Reviewed-by",
36+
"Acked-by",
37+
"Tested-by",
38+
"Reported-by",
39+
"Suggested-by",
40+
"Helped-by",
41+
"Cc",
42+
];
43+
const TRAILER = new RegExp(`^(?:${TRAILER_KEYS.join("|")}):\\s`, "i");
44+
45+
const stripTrailers = (text) => {
46+
if (!text) {
47+
return text;
48+
}
49+
50+
const lines = text.split("\n");
51+
while (lines.length) {
52+
const last = lines[lines.length - 1].trim();
53+
if (last === "" || TRAILER.test(last)) {
54+
lines.pop();
55+
} else {
56+
break;
57+
}
58+
}
59+
return lines.join("\n");
60+
};
61+
62+
const preset = await conventionalcommits();
63+
const presetTransform = preset.writer.transform;
64+
const dryRun = process.env.RELEASE_DRY_RUN !== "false";
65+
66+
export default {
67+
branches: [
68+
{ name: "+([0-9])?(.{+([0-9]),x}).x" },
69+
{ name: "main" },
70+
{ name: "next" },
71+
{ name: "next-major" },
72+
{ name: "beta", prerelease: true },
73+
{ name: "alpha", prerelease: true },
74+
],
75+
preset: "conventionalcommits",
76+
dryRun,
77+
plugins: [
78+
[
79+
"@semantic-release/release-notes-generator",
80+
{
81+
writerOpts: {
82+
transform(commit, context) {
83+
const out = presetTransform(commit, context);
84+
if (out && Array.isArray(out.notes)) {
85+
out.notes = out.notes.map((note) => ({
86+
...note,
87+
text: stripTrailers(note.text),
88+
}));
89+
}
90+
return out;
91+
},
92+
},
93+
},
94+
],
95+
[
96+
"@semantic-release/commit-analyzer",
97+
{
98+
releaseRules: [{ breaking: true, release: "minor" }],
99+
},
100+
],
101+
[
102+
"@semantic-release/exec",
103+
dryRun
104+
? {}
105+
: {
106+
verifyConditionsCmd: "ci/release/verify.sh",
107+
prepareCmd: "ci/release/prepare.sh ${nextRelease.version}",
108+
publishCmd: "ci/release/publish.sh",
109+
},
110+
],
111+
[
112+
"@semantic-release/changelog",
113+
{
114+
changelogTitle: "Release Notes\n---",
115+
changelogFile: "CHANGELOG.md",
116+
},
117+
],
118+
...(dryRun
119+
? []
120+
: [
121+
[
122+
"@semantic-release/github",
123+
{
124+
assets: [
125+
{
126+
path: "native/libs/isthmus-macOS-latest",
127+
name: "isthmus-macOS-${nextRelease.version}",
128+
label: "Isthmus Native Image - macOS",
129+
},
130+
{
131+
path: "native/libs/isthmus-ubuntu-latest",
132+
name: "isthmus-ubuntu-${nextRelease.version}",
133+
label: "Isthmus Native Image - Linux",
134+
},
135+
],
136+
successComment: false,
137+
},
138+
],
139+
[
140+
"@semantic-release/git",
141+
{
142+
assets: ["gradle.properties", "CHANGELOG.md"],
143+
message: "chore(release): ${nextRelease.version}",
144+
},
145+
],
146+
]),
147+
],
148+
};

CHANGELOG.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,63 @@ Release Notes
33

44
## [0.95.0](https://github.com/substrait-io/substrait-java/compare/v0.94.0...v0.95.0) (2026-07-05)
55

6+
### ⚠ BREAKING CHANGES
7+
8+
* **core:** remove deprecated Time, Timestamp, TimestampTZ types and literals (#950)
9+
* **deps:** Protobuf bindings are now generated using the v4
10+
protobuf libraries, released in March 2024. Ensure that dependent
11+
projects also use the v4 protobuf-java libraries, and be aware of the
12+
breaking changes within the protobuf-java APIs documented at
13+
https://protobuf.dev/news/v26/#java-breaking-changes
14+
15+
### Features
16+
17+
* **core:** add Substrait dialect support ([#861](https://github.com/substrait-io/substrait-java/issues/861)) ([ff76c77](https://github.com/substrait-io/substrait-java/commit/ff76c771d37f644ee57c77c7db0eb061804126f5))
18+
* **core:** remove deprecated Time, Timestamp, TimestampTZ types and literals ([#950](https://github.com/substrait-io/substrait-java/issues/950)) ([71b940f](https://github.com/substrait-io/substrait-java/commit/71b940f94fcd711603d1cfbafb9a2002ea5fd0f5))
19+
* **isthmus:** map execution context variables to/from Calcite ([#976](https://github.com/substrait-io/substrait-java/issues/976)) ([08c2889](https://github.com/substrait-io/substrait-java/commit/08c2889e675bb51ef6b5d39b8c9ed1e3811a474b))
20+
21+
### Bug Fixes
22+
23+
* **core:** add compiled output to javadocImmutable classpath ([#953](https://github.com/substrait-io/substrait-java/issues/953)) ([1d3ea51](https://github.com/substrait-io/substrait-java/commit/1d3ea51537ee6b3e944ae6db96d014ef15e37c41))
24+
* **core:** validate Plan.Root output name count ([#812](https://github.com/substrait-io/substrait-java/issues/812)) ([4bd6b69](https://github.com/substrait-io/substrait-java/commit/4bd6b69ce535098da82d1ae33d6e2cfd78c62e78))
25+
* **isthmus:** avoid NPE from dangling correlations left by partial decorrelation ([fbf2930](https://github.com/substrait-io/substrait-java/commit/fbf2930ce575a47a643940f3f5bcd89474dab3cc))
26+
* **isthmus:** handle LITERAL_AGG in aggregate conversion ([52a32ba](https://github.com/substrait-io/substrait-java/commit/52a32bad575da67031ddd4e44caddeef641b9ed5))
27+
* **isthmus:** use reachability-metadata.json for native image build ([#979](https://github.com/substrait-io/substrait-java/issues/979)) ([a1e48c6](https://github.com/substrait-io/substrait-java/commit/a1e48c6b4d38b5ec8750b1918263c35bc1a83dc0))
28+
* **isthmus:** use Substrait type system when building Calcite RelBuilder ([#973](https://github.com/substrait-io/substrait-java/issues/973)) ([b370df5](https://github.com/substrait-io/substrait-java/commit/b370df50b8f35e802be3e78d3e5f87303b2e7517)), closes [#954](https://github.com/substrait-io/substrait-java/issues/954) [#955](https://github.com/substrait-io/substrait-java/issues/955)
29+
30+
### Build System
31+
32+
* **deps:** update protobuf from v3 to v4 ([#962](https://github.com/substrait-io/substrait-java/issues/962)) ([1516209](https://github.com/substrait-io/substrait-java/commit/1516209dd1c6801082a4a04649b5da79af4e0a1b))
33+
34+
### ⚠ BREAKING CHANGES
35+
36+
* **core:** remove deprecated Time, Timestamp, TimestampTZ types and literals (#950)
37+
* **deps:** Protobuf bindings are now generated using the v4
38+
protobuf libraries, released in March 2024. Ensure that dependent
39+
projects also use the v4 protobuf-java libraries, and be aware of the
40+
breaking changes within the protobuf-java APIs documented at
41+
https://protobuf.dev/news/v26/#java-breaking-changes
42+
43+
### Features
44+
45+
* **core:** add Substrait dialect support ([#861](https://github.com/substrait-io/substrait-java/issues/861)) ([ff76c77](https://github.com/substrait-io/substrait-java/commit/ff76c771d37f644ee57c77c7db0eb061804126f5))
46+
* **core:** remove deprecated Time, Timestamp, TimestampTZ types and literals ([#950](https://github.com/substrait-io/substrait-java/issues/950)) ([71b940f](https://github.com/substrait-io/substrait-java/commit/71b940f94fcd711603d1cfbafb9a2002ea5fd0f5))
47+
* **isthmus:** map execution context variables to/from Calcite ([#976](https://github.com/substrait-io/substrait-java/issues/976)) ([08c2889](https://github.com/substrait-io/substrait-java/commit/08c2889e675bb51ef6b5d39b8c9ed1e3811a474b))
48+
49+
### Bug Fixes
50+
51+
* **core:** add compiled output to javadocImmutable classpath ([#953](https://github.com/substrait-io/substrait-java/issues/953)) ([1d3ea51](https://github.com/substrait-io/substrait-java/commit/1d3ea51537ee6b3e944ae6db96d014ef15e37c41))
52+
* **core:** validate Plan.Root output name count ([#812](https://github.com/substrait-io/substrait-java/issues/812)) ([4bd6b69](https://github.com/substrait-io/substrait-java/commit/4bd6b69ce535098da82d1ae33d6e2cfd78c62e78))
53+
* **isthmus:** avoid NPE from dangling correlations left by partial decorrelation ([fbf2930](https://github.com/substrait-io/substrait-java/commit/fbf2930ce575a47a643940f3f5bcd89474dab3cc))
54+
* **isthmus:** handle LITERAL_AGG in aggregate conversion ([52a32ba](https://github.com/substrait-io/substrait-java/commit/52a32bad575da67031ddd4e44caddeef641b9ed5))
55+
* **isthmus:** use reachability-metadata.json for native image build ([#979](https://github.com/substrait-io/substrait-java/issues/979)) ([a1e48c6](https://github.com/substrait-io/substrait-java/commit/a1e48c6b4d38b5ec8750b1918263c35bc1a83dc0))
56+
* **isthmus:** use Substrait type system when building Calcite RelBuilder ([#973](https://github.com/substrait-io/substrait-java/issues/973)) ([b370df5](https://github.com/substrait-io/substrait-java/commit/b370df50b8f35e802be3e78d3e5f87303b2e7517)), closes [#954](https://github.com/substrait-io/substrait-java/issues/954) [#955](https://github.com/substrait-io/substrait-java/issues/955)
57+
58+
### Build System
59+
60+
* **deps:** update protobuf from v3 to v4 ([#962](https://github.com/substrait-io/substrait-java/issues/962)) ([1516209](https://github.com/substrait-io/substrait-java/commit/1516209dd1c6801082a4a04649b5da79af4e0a1b))
61+
62+
663
## [0.94.0](https://github.com/substrait-io/substrait-java/compare/v0.93.0...v0.94.0) (2026-06-21)
764

865
### Features

ci/release/dry_run.sh

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,19 @@ trap cleanup EXIT ERR
2121
cd "$worktree" || exit 1
2222

2323
export GITHUB_REF="$branch"
24+
export RELEASE_DRY_RUN=true
2425

2526
npx --yes \
26-
-p semantic-release \
27-
-p "@semantic-release/commit-analyzer" \
28-
-p "@semantic-release/release-notes-generator" \
29-
-p "@semantic-release/changelog" \
30-
-p "@semantic-release/exec" \
31-
-p "@semantic-release/git" \
32-
-p "conventional-changelog-conventionalcommits" \
27+
-p "semantic-release@25.0.5" \
28+
-p "@semantic-release/commit-analyzer@13.0.1" \
29+
-p "@semantic-release/release-notes-generator@14.1.1" \
30+
-p "@semantic-release/changelog@7.0.0-beta.1" \
31+
-p "@semantic-release/github@12.0.8" \
32+
-p "@semantic-release/exec@7.1.0" \
33+
-p "@semantic-release/git@10.0.1" \
34+
-p "conventional-changelog-conventionalcommits@9.3.1" \
3335
semantic-release \
3436
--ci false \
3537
--dry-run \
36-
--preset conventionalcommits \
37-
--plugins \
38-
--analyze-commits "@semantic-release/commit-analyzer" \
39-
--generate-notes "@semantic-release/release-notes-generator" \
40-
--verify-conditions "@semantic-release/changelog,@semantic-release/exec,@semantic-release/git" \
41-
--prepare "@semantic-release/changelog,@semantic-release/exec" \
4238
--branches "$branch" \
4339
--repository-url "file://$PWD"

ci/release/run.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33

44
set -euo pipefail
55

6-
npx --yes \
7-
-p semantic-release \
8-
-p "@semantic-release/commit-analyzer" \
9-
-p "@semantic-release/release-notes-generator" \
10-
-p "@semantic-release/changelog" \
11-
-p "@semantic-release/github" \
12-
-p "@semantic-release/exec" \
13-
-p "@semantic-release/git" \
14-
-p "conventional-changelog-conventionalcommits" \
6+
RELEASE_DRY_RUN=false npx --yes \
7+
-p "semantic-release@25.0.5" \
8+
-p "@semantic-release/commit-analyzer@13.0.1" \
9+
-p "@semantic-release/release-notes-generator@14.1.1" \
10+
-p "@semantic-release/changelog@7.0.0-beta.1" \
11+
-p "@semantic-release/github@12.0.8" \
12+
-p "@semantic-release/exec@7.1.0" \
13+
-p "@semantic-release/git@10.0.1" \
14+
-p "conventional-changelog-conventionalcommits@9.3.1" \
1515
semantic-release --ci

0 commit comments

Comments
 (0)