diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6758863a..6e541a8e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -252,6 +252,13 @@ jobs: certutil -hashfile SHA256 # Windows, mit SHA256SUMS.txt vergleichen \`\`\` + Die Datei deckt \`.msi\`, \`.deb\` und \`.apk\` ab. Ein \`.dmg\` wird erst nach diesem + Release gebaut und bringt seine eigene Prüfsumme mit: + + \`\`\` + shasum -a 256 -c lagebuch-${VERSION}-macos-arm64.dmg.sha256 + \`\`\` + Jede Installationsdatei trägt zusätzlich einen Sigstore-Herkunftsnachweis aus dem Workflow-Lauf, der sie gebaut hat — prüfbar mit der GitHub CLI: diff --git a/CHANGELOG.md b/CHANGELOG.md index 33293b98..71a39924 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -174,6 +174,12 @@ once we reach 1.0. compares its actual columns against the expected schema and adds whatever is missing, regardless of the recorded version, so an affected file repairs itself the next time it is opened. Columns and tables the app does not know are left untouched. +- The download-verification instructions no longer send macOS users to a file that cannot + contain their download. `SHA256SUMS.txt` covers the `.msi`, the `.deb` and the `.apk`; the + `.dmg` is built after the release exists and carries its own `.dmg.sha256`, so + `shasum -a 256 -c SHA256SUMS.txt` — the only line the README and the release notes offered a + Mac user — failed on every one of the three files it listed. Both now name the `.dmg.sha256` + path as well. ### Security - Attachment names are stripped of invisible formatting characters, not just control characters. diff --git a/README.md b/README.md index 7d4095e4..ebda891c 100644 --- a/README.md +++ b/README.md @@ -159,6 +159,14 @@ certutil -hashfile SHA256 # Windows, mit SHA256SUMS.txt vergleichen gh attestation verify --repo CodeForFire/lagebuch ``` +`SHA256SUMS.txt` deckt `.msi`, `.deb` und `.apk` ab. Das `.dmg` entsteht erst +nach dem Release und bringt deshalb seine eigene Prüfsumme mit: + +```bash +shasum -a 256 -c lagebuch--macos-arm64.dmg.sha256 # macOS +sha256sum -c lagebuch--macos-arm64.dmg.sha256 # Linux +``` + So lässt sich nachweisen, dass die Datei unverändert aus diesem Repository stammt – auch solange die Pakete noch nicht signiert sind. diff --git a/docs/releasing.md b/docs/releasing.md index 2dc26abb..c40ecb85 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -21,6 +21,22 @@ new version heading before tagging. The heading has to match the tag exactly minus the `v` (`## [0.6.0-beta.1]` for `v0.6.0-beta.1`); otherwise the notes fall back to a "no changelog entry found" placeholder. +## After the tag: check the release + +The checksums and the provenance are what the README tells users to verify, and +only a tag push runs those steps — they landed after v0.5.0 was cut (#375), so +they had never run once when this list was written. Four checks, once per +release: + +- [ ] `SHA256SUMS.txt` is attached and lists the `.msi`, the `.deb` and the + `.apk` under their bare names. `sha256sum -c SHA256SUMS.txt` has to pass + in a folder holding nothing but the downloads. +- [ ] `gh attestation verify --repo CodeForFire/lagebuch` passes for + those three. It reads the file, not the URL, so download them first. +- [ ] The macOS run attached both the `.dmg` and its `.sha256`, and + `shasum -a 256 -c lagebuch--macos-arm64.dmg.sha256` passes. +- [ ] The release is marked pre-release if and only if the tag carries a suffix. + ## Betas and release candidates A tag with a suffix — `v0.6.0-beta.1`, `v0.6.0-rc.2` — publishes as a GitHub @@ -100,8 +116,22 @@ pipeline is the authoritative check. ## macOS The macOS `.dmg` is built on demand rather than on every tag: run the -**Release** workflow manually (*Actions → Release → Run workflow*) with the -release version, and the `.dmg` is attached to that release. +**Release** workflow manually with the release version, and the `.dmg` plus its +`.sha256` are attached to that release. + +**Start the run on the tag, not on `main`.** A manual run checks out the ref it +was started on, so starting it on `main` builds whatever has merged since the +tag and uploads that as the release's `.dmg`: + +```bash +gh workflow run release.yml --ref v0.6.0 -f version=0.6.0 +``` + +In the web UI: *Actions → Release → Run workflow*, then set **Use workflow +from** to the tag before filling in the version. + +The `.dmg` is built after the tag release already exists, so it cannot join +that release's `SHA256SUMS.txt`; it carries a `.dmg.sha256` next to it instead. ## Local packaging