Skip to content

Commit 02e36c7

Browse files
mschmickingclaude
andcommitted
fix(ci): let the release PR actually run its checks, and fix the tag name
Two problems with the open release PR: Every workflow on its branch sits at 'action_required' with a 0s runtime. GitHub refuses to trigger workflows from events raised with GITHUB_TOKEN, so the release pull request arrives with no checks — and the branch ruleset now requires five of them, which makes it permanently unmergeable. The action now takes RELEASE_PLEASE_TOKEN, a PAT, falling back to GITHUB_TOKEN so the workflow still runs without the secret. The compare link in the PR body reads iobroker-sync-v0.1.0...v0.2.0: the component name was going into the tag. This repository publishes one package and release.yml tags v$VERSION, so include-component-in-tag is off and tags are plain v0.2.0. Safe to change since nothing has been released. The checklist also explains why the proposal is 0.2.0 rather than 0.1.1 — a feat landed since 0.1.0, so the bump is minor. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 6fe3742 commit 02e36c7

3 files changed

Lines changed: 66 additions & 13 deletions

File tree

.github/workflows/release-please.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ jobs:
2121
steps:
2222
- uses: googleapis/release-please-action@v5
2323
with:
24+
# A PAT, not GITHUB_TOKEN. GitHub refuses to trigger workflows from events
25+
# raised with GITHUB_TOKEN, so the release pull request would arrive with
26+
# every check stuck in "action_required" and never run — and the branch
27+
# ruleset requires those checks, making the PR permanently unmergeable.
28+
# Falls back to GITHUB_TOKEN so the workflow still functions without the
29+
# secret; the PR just will not get checks.
30+
token: ${{ secrets.RELEASE_PLEASE_TOKEN || secrets.GITHUB_TOKEN }}
2431
# Configuration lives in release-please-config.json and the current version
2532
# in .release-please-manifest.json. Without the manifest the action logs
2633
# 'No version for path .' and never opens a release PR — it cannot know

docs/GOING-PUBLIC.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,18 @@ These change how merges behave, and the release automation depends on them.
5656
— a publish token will prompt for 2FA and hang in CI
5757
- [ ] Add it as **Settings → Secrets and variables → Actions → New repository secret**,
5858
named `NPM_TOKEN`
59+
60+
- [ ] Create a **fine-grained personal access token** and add it as `RELEASE_PLEASE_TOKEN`
61+
— Settings → Developer settings → Personal access tokens → Fine-grained, scoped to
62+
this repository, with **Contents: read/write** and **Pull requests: read/write**.
63+
64+
> **Without it the release pull request gets no checks and can never be merged.**
65+
> GitHub refuses to trigger workflows from events raised with `GITHUB_TOKEN`, so every
66+
> check on the release PR sits at `action_required` with a 0s runtime — and the branch
67+
> ruleset requires five of them. A PAT is not subject to that restriction.
68+
>
69+
> Symptom if you skip it: `gh pr checks <n>` prints "no checks reported".
70+
5971
- [ ] Confirm the package name is still unclaimed: `npm view iobroker-sync` should 404
6072

6173
## 3. Final content pass
@@ -73,7 +85,9 @@ release-please only bumps on `feat` and `fix` commits. Everything merged so far
7385
`ci`/`chore`/`docs`/`test`, so **no release PR will appear on its own**, and the first
7486
release has to be asked for explicitly.
7587

76-
To go straight to 1.0.0, land an empty commit naming the version:
88+
Note it bumps by commit type, so a `feat` since the last release means a **minor** bump —
89+
which is why the open PR proposes 0.2.0 rather than 0.1.1. To go straight to 1.0.0, land
90+
an empty commit naming the version:
7791

7892
```bash
7993
git commit --allow-empty -m "chore: release 1.0.0" -m "Release-As: 1.0.0"
@@ -84,9 +98,12 @@ release-please then opens a "chore(main): release 1.0.0" PR that bumps
8498
`package.json`, rewrites `CHANGELOG.md` and updates
8599
`.release-please-manifest.json`. Merging that PR creates the `v1.0.0` tag.
86100

87-
- [ ] Land the `Release-As` commit
88-
- [ ] Review and merge the release PR it opens
89-
- [ ] Confirm the `v1.0.0` tag exists
101+
- [ ] Land the `Release-As` commit — release-please updates the **existing** release PR
102+
in place, so there is no need to close it first
103+
- [ ] Check the PR now says 1.0.0 and that its checks actually ran
104+
- [ ] Review and merge it
105+
- [ ] Confirm the tag is `v1.0.0` (not `iobroker-sync-v1.0.0` — that would mean
106+
`include-component-in-tag` crept back on)
90107

91108
## 4. Publish and flip — in this order
92109

release-please-config.json

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,44 @@
88
"include-v-in-tag": true,
99
"bump-minor-pre-major": false,
1010
"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-
]
11+
{
12+
"type": "feat",
13+
"section": "Added"
14+
},
15+
{
16+
"type": "fix",
17+
"section": "Fixed"
18+
},
19+
{
20+
"type": "perf",
21+
"section": "Performance"
22+
},
23+
{
24+
"type": "refactor",
25+
"section": "Changed"
26+
},
27+
{
28+
"type": "docs",
29+
"section": "Documentation",
30+
"hidden": true
31+
},
32+
{
33+
"type": "test",
34+
"section": "Tests",
35+
"hidden": true
36+
},
37+
{
38+
"type": "ci",
39+
"section": "CI",
40+
"hidden": true
41+
},
42+
{
43+
"type": "chore",
44+
"section": "Chores",
45+
"hidden": true
46+
}
47+
],
48+
"include-component-in-tag": false
2049
}
2150
}
2251
}

0 commit comments

Comments
 (0)