release: stage dist before signing, and sign via a named volume #188
Loading…
Reference in a new issue
No description provided.
Delete branch "wt/t_3e3bc228"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes the two publish-job bugs that blocked
v0.5.0.1. The sign step could not see
.ci-tools. It randocker run --rm -v "${GITHUB_WORKSPACE}:/work" ....GITHUB_WORKSPACEis apath inside the job container; docker resolves a bind mount's source on the
host, where it does not exist, so
/workarrived empty and the script wasmissing. Run 768:
bash: .ci-tools/scripts/sign-release.sh: No such file or directory(exit 127).Reproduced against the pinned image locally, then fixed with the same pattern
the build jobs already use — named volume +
docker cpin/out:Named-volume rehearsal, same image, same script, throwaway key:
2. Signing ran before
dist/was populated. Thefind+cploop lived inthe publish step, i.e. after the signature step, so
dist/was empty whenthe signer looked at it. It is now its own
Stage both arch artifacts into diststep before signing; publish only validates
dist/.Step order is now: download artifacts → stage into
dist/→ sign (fail closed)→ verify the four
.minisigfiles came back out → publish → fail-closed tagcleanup. No change to the fail-closed design: no key, no publish.
docs/RELEASING.md's description of the publish job is updated to match.The publish job has never completed. Two plumbing bugs, no crypto involved: 1. The sign step ran `docker run -v "${GITHUB_WORKSPACE}:/work"`. GITHUB_WORKSPACE is a path INSIDE the job container, but docker resolves a bind mount's source on the HOST, where that path does not exist — so /work arrived empty and the script was absent. Run 768 failed with "bash: .ci-tools/scripts/sign-release.sh: No such file or directory" (127). Rehearsed locally against the pinned image: the bind mount yields an empty /work, the same command with a named volume + docker cp signs and self-verifies all four assets. Use the build jobs' pattern. 2. Signing ran before the files it signs existed. The find+cp loop that fills dist/ lived in the publish step, after the signature step. Move it into its own "Stage both arch artifacts into dist" step before signing, and let publish only validate dist/. Fail-closed design unchanged: no MINISIGN_SECRET_KEY stops before any upload, signing still precedes publishing, and the tag cleanup step is untouched. docs/RELEASING.md described the old publish job; it now matches the workflow.