Skip to content

chore(release): v0.4.1, and stop every release needing hand edits - #51

Merged
SecretLUL merged 2 commits into
mainfrom
chore/release-v0.4.1
Sep 6, 2026
Merged

SecretLUL merged 2 commits into
mainfrom
chore/release-v0.4.1

Conversation

@SecretLUL

@SecretLUL SecretLUL commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Two commits: the v0.4.1 version bump, and the reason a bump needs its own pull request at all.

chore(release): v0.4.1

Raises the version across Cargo.toml, Cargo.lock and the issue template, and adds docs/release-notes/v0.4.1.md covering #50 and #49.

chore(release): stop the README repeating the version, script the bump PR

The README no longer states a version. Its checksum example named winmedic-v<version>.exe twice, so set-version.ps1 rewrote a docs file on every release. It now globs winmedic-v*.exe out of the download directory — which is what the reader has in front of them anyway:

$exe      = Get-Item .\winmedic-v*.exe | Select-Object -First 1
$expected = (Get-Content "$($exe.FullName).sha256").Split(' ')[0]
$actual   = (Get-FileHash $exe.FullName -Algorithm SHA256).Hash.ToLower()
if ($expected -eq $actual) { "OK - checksum matches" } else { "MISMATCH - do not run this file" }

Verified against a matching and a tampered file. README.md is therefore out of set-version.ps1's target list, with a note saying why it must not be added back: a target whose pattern never matches makes the script throw.

scripts/prepare-release.ps1 opens the pull request this one is. The release workflow cannot land its own bump on main — the branch is protected, GITHUB_TOKEN is not allowed through, and the pull-request fallback needs a setting that is off. That is why run #7 went red while v0.4.0 itself shipped perfectly.

Both documented fixes hand CI a way past branch protection. This takes the other road — the bump goes down the same reviewed, CI-gated path as every other change:

./scripts/prepare-release.ps1 0.4.2   # branch, set-version, commit, PR
# merge it, then:
gh workflow run release.yml --ref main -f version=0.4.2

Releasing from a main that already states the version makes the workflow's own bump step a no-op — it finds every site correct, tags HEAD unchanged, and the check it failed on passes.

The script refuses a version that has already shipped, a dirty tree and an existing branch, and warns when docs/release-notes/<tag>.md is missing while writing one is still cheap. -NoPush prepares the commit locally without pushing or opening anything. All four paths were exercised locally.

CONTRIBUTING.md and the workflow's own guidance now describe that path first. CONTRIBUTING also claimed the workflow "brings main up to date", which is the one thing it cannot do.

Does it change what WinMedic does to a system?

  • No — version strings, release tooling and documentation only.

Checks

  • set-version.ps1 0.4.1 -Check passes with README removed from its targets
  • prepare-release.ps1 end-to-end with -NoPush, plus its invalid-version, already-shipped-tag and dirty-tree guards
  • release.yml still parses; both jobs intact

🤖 Generated with Claude Code

SecretLUL and others added 2 commits September 6, 2026 13:09
Lands the bump on main *before* the release runs, which is what the
release workflow needs in order to finish green.

"Bring the branch up to the released version" checks one thing: is the
commit it built from an ancestor of main. It cannot make that true by
itself here — GITHUB_TOKEN is not allowed through branch protection, and
the pull request fallback needs "Allow GitHub Actions to create and
approve pull requests", which is off. That is why v0.4.0's run is red
even though the release itself shipped correctly.

With every version site already stating 0.4.1, the workflow's own bump
step finds nothing to write, tags main's HEAD unchanged, and the ancestor
check passes.

Also adds docs/release-notes/v0.4.1.md, which the workflow prefers over
GitHub's generated commit list.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…p PR

Two things that made every release cost manual edits.

The README's checksum example named `winmedic-v<version>.exe` twice, so
set-version.ps1 had to rewrite it on every bump — a docs file in the
release path for no reason other than two hardcoded filenames. It now
globs `winmedic-v*.exe` out of the download directory, which is what the
reader has in front of them anyway, and states no version at all.
README.md is therefore gone from set-version.ps1's target list, with a
note saying why it must not be added back: a target whose pattern never
matches makes the script throw.

The second is the bump reaching `main`. The workflow cannot push it
there — `main` is protected and GITHUB_TOKEN is not allowed through, and
the pull request fallback needs a setting that is off — so the last step
of every release run goes red, as v0.4.0 did while shipping perfectly.
The two documented fixes both hand CI a way past branch protection.

prepare-release.ps1 takes the other road: it branches off origin/main,
runs set-version.ps1, commits and opens the pull request, so the bump
arrives the same reviewed, CI-gated way as every other change. Releasing
from a `main` that already states the version then makes the workflow's
own bump step a no-op, and the check it failed on passes.

It refuses a version that has already shipped, a dirty tree and an
existing branch, and points out a missing docs/release-notes/<tag>.md
while writing one is still cheap. -NoPush prepares the commit locally
without pushing or opening anything.

CONTRIBUTING and the workflow's own guidance now describe that path
first; CONTRIBUTING also claimed the workflow "brings main up to date",
which is the one thing it cannot do.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@SecretLUL SecretLUL changed the title chore(release): v0.4.1 chore(release): v0.4.1, and stop every release needing hand edits Sep 6, 2026
@SecretLUL
SecretLUL merged commit c868e55 into main Sep 6, 2026
4 checks passed
@SecretLUL
SecretLUL deleted the chore/release-v0.4.1 branch September 6, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant