Fix release changelog range and attach RPM + checksums #18

Merged
benvin merged 1 commits from benvin/release-assets-fix into main 2026-07-25 14:58:25 +10:00
Owner

Why

The v0.5.4 release step failed with Error: open node-lookup-linux-amd64: no such file or directory, so the Gitea releases page carries none of the binaries. Root cause: at v0.5.4 the build loop's shell variables (${name}, ${pkg}, ${osarch%/*}) were unescaped, so Woodpecker substituted them to empty at YAML-parse time and no cross-compiled binaries were produced. The same blanking left the release --note empty (git log "..v0.5.4").

The build-loop escaping was already fixed in #16. This PR fixes the two remaining release-step defects and enriches the release assets.

Changes

  • Replace the git describe --tags --abbrev=0 HEAD^ changelog anchor with a previous-tag scan that skips tags on the current commit and picks the newest semver ancestor tag. Several tags point at the same commit (v0.5.3 and v0.5.4 both on f296056), so describe HEAD^ jumps the range back to v0.5.1; the scan correctly selects v0.5.2.
  • Attach the packaged RPM (from dist/) and a generated sha256sums.txt alongside the 12 cross-compiled binaries.
  • Build the asset list once and checksum exactly what is uploaded.

Keeps serviceAccountName: default and the k8s resource requests/limits on the release step unchanged.

Validation

  • check-yaml / trailing-whitespace pre-commit hooks pass.
  • Local dry-run of the exact release-step shell logic (with $$$) from the worktree: PREV_TAG=v0.5.2, non-empty notes, and all 13 assets (12 binaries + RPM) plus sha256sums.txt resolve on disk.
## Why The `v0.5.4` release step failed with `Error: open node-lookup-linux-amd64: no such file or directory`, so the Gitea releases page carries **none** of the binaries. Root cause: at v0.5.4 the build loop's shell variables (`${name}`, `${pkg}`, `${osarch%/*}`) were unescaped, so Woodpecker substituted them to empty at YAML-parse time and no cross-compiled binaries were produced. The same blanking left the release `--note` empty (`git log "..v0.5.4"`). The build-loop escaping was already fixed in #16. This PR fixes the two remaining release-step defects and enriches the release assets. ## Changes - Replace the `git describe --tags --abbrev=0 HEAD^` changelog anchor with a previous-tag scan that skips tags on the current commit and picks the newest semver **ancestor** tag. Several tags point at the same commit (v0.5.3 and v0.5.4 both on `f296056`), so `describe HEAD^` jumps the range back to v0.5.1; the scan correctly selects v0.5.2. - Attach the packaged RPM (from `dist/`) and a generated `sha256sums.txt` alongside the 12 cross-compiled binaries. - Build the asset list once and checksum exactly what is uploaded. Keeps `serviceAccountName: default` and the k8s resource requests/limits on the release step unchanged. ## Validation - `check-yaml` / `trailing-whitespace` pre-commit hooks pass. - Local dry-run of the exact release-step shell logic (with `$$`→`$`) from the worktree: `PREV_TAG=v0.5.2`, non-empty notes, and all 13 assets (12 binaries + RPM) plus `sha256sums.txt` resolve on disk.
unkinben added 1 commit 2026-07-25 12:58:55 +10:00
Fix release: robust changelog range + attach RPM and checksums
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
9fe99b1f50
The v0.5.4 release step failed (open node-lookup-linux-amd64: no such
file or directory) and the releases page carried no binaries: the build
loop's unescaped shell vars were blanked by Woodpecker at parse time so
no cross-compiled binaries were produced, and the same blanking left the
release --note empty (git log "..v0.5.4").

- Replace the describe HEAD^ changelog anchor with a previous-tag scan
  that skips tags on the current commit and picks the newest semver
  ancestor tag, so duplicate-commit tags (v0.5.3/v0.5.4) no longer jump
  the range back to v0.5.1 or produce an empty note.
- Attach the packaged RPM (from dist/) and a generated sha256sums.txt
  alongside the 12 cross-compiled binaries.
- Build the asset list once and checksum exactly what is uploaded.
benvin merged commit 182bd326b8 into main 2026-07-25 14:58:25 +10:00
benvin deleted branch benvin/release-assets-fix 2026-07-25 14:58:25 +10:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/node-lookup#18