Skip to content

Commit cab77a4

Browse files
mschmickingclaude
andcommitted
fix(ci): make release-please able to open a release PR
The workflow ran green every time and did nothing. Two faults: - changelog-notes-type is not a valid input for the v5 action, which warned 'Unexpected input(s)' and ignored it. - More seriously, it logged 'No version for path .' on every run. With no release ever tagged there is nothing to derive the current version from, so it could never propose the next one. A release PR would never have appeared, and the failure mode is a green check. Adds .release-please-manifest.json pinning the current version and release-please-config.json holding the rest, with changelog sections that hide ci/chore/docs/test noise from release notes. The checklist also gains the step this exposed: release-please only bumps on feat and fix, and everything merged so far is ci/chore/docs/test, so 1.0.0 has to be requested with a Release-As commit rather than waited for. Going public and publishing to npm are also separated: CodeQL has skipped itself on every run so far, so its findings are unknown. Going public is reversible and npm publish is not — read the findings in between. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent d207527 commit cab77a4

4 files changed

Lines changed: 56 additions & 6 deletions

File tree

.github/workflows/release-please.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ jobs:
2121
steps:
2222
- uses: googleapis/release-please-action@v5
2323
with:
24-
release-type: node
25-
# Keeps the existing hand-written CHANGELOG entries intact by appending
26-
# below the header rather than replacing the file.
27-
changelog-notes-type: default
24+
# Configuration lives in release-please-config.json and the current version
25+
# in .release-please-manifest.json. Without the manifest the action logs
26+
# 'No version for path .' and never opens a release PR — it cannot know
27+
# what the previous version was, since no release has ever been tagged.
28+
config-file: release-please-config.json
29+
manifest-file: .release-please-manifest.json

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.1.0"
3+
}

docs/GOING-PUBLIC.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,39 @@ These change how merges behave, and the release automation depends on them.
5353
- [ ] Decide the version. `package.json` still says `0.1.0`; releasing as `1.0.0` is a
5454
commitment to the current CLI surface under semver.
5555

56+
## 3b. Cut the release
57+
58+
release-please only bumps on `feat` and `fix` commits. Everything merged so far is
59+
`ci`/`chore`/`docs`/`test`, so **no release PR will appear on its own**, and the first
60+
release has to be asked for explicitly.
61+
62+
To go straight to 1.0.0, land an empty commit naming the version:
63+
64+
```bash
65+
git commit --allow-empty -m "chore: release 1.0.0" -m "Release-As: 1.0.0"
66+
git push
67+
```
68+
69+
release-please then opens a "chore(main): release 1.0.0" PR that bumps
70+
`package.json`, rewrites `CHANGELOG.md` and updates
71+
`.release-please-manifest.json`. Merging that PR creates the `v1.0.0` tag.
72+
73+
- [ ] Land the `Release-As` commit
74+
- [ ] Review and merge the release PR it opens
75+
- [ ] Confirm the `v1.0.0` tag exists
76+
5677
## 4. Publish and flip — in this order
5778

5879
`npm publish --provenance` attaches a signed attestation that the tarball was built from
5980
a specific commit in this repository. **It only works on a public repository**, so the
6081
release workflow fails while private. That forces this sequence:
6182

6283
1. [ ] **Make the repository public** (Settings → General → Danger Zone)
63-
2. [ ] Remove the `> **Not released yet.**` blockquote from the README quick start, and
84+
2. [ ] **Wait for CodeQL to finish its first run**, and read the findings. It has been
85+
skipping itself this whole time, so its output is genuinely unknown. Going public
86+
is reversible; `npm publish` is not — so look before you publish.
87+
3. [ ] Remove the `> **Not released yet.**` blockquote from the README quick start, and
6488
the `RELEASE CHECKLIST` HTML comment beside it
65-
3. [ ] Bump the version and merge the release-please PR (or bump manually and tag)
6689
4. [ ] Run **Actions → Release to npm** with `dry_run: true` and read the file list
6790
5. [ ] Run it again with `dry_run: false`
6891
6. [ ] Verify: `npm view iobroker-sync`, then in a clean directory

release-please-config.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"packages": {
4+
".": {
5+
"release-type": "node",
6+
"package-name": "iobroker-sync",
7+
"changelog-path": "CHANGELOG.md",
8+
"include-v-in-tag": true,
9+
"bump-minor-pre-major": false,
10+
"changelog-sections": [
11+
{ "type": "feat", "section": "Added" },
12+
{ "type": "fix", "section": "Fixed" },
13+
{ "type": "perf", "section": "Performance" },
14+
{ "type": "refactor", "section": "Changed" },
15+
{ "type": "docs", "section": "Documentation", "hidden": true },
16+
{ "type": "test", "section": "Tests", "hidden": true },
17+
{ "type": "ci", "section": "CI", "hidden": true },
18+
{ "type": "chore", "section": "Chores", "hidden": true }
19+
]
20+
}
21+
}
22+
}

0 commit comments

Comments
 (0)