release: stage dist before signing, and sign via a named volume
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.
This commit is contained in:
parent
601f640f78
commit
46baf67a14
2 changed files with 80 additions and 28 deletions
|
|
@ -110,11 +110,19 @@ The `SOURCE_DATE_EPOCH` step reads the committer time of
|
|||
`needs.version.outputs.sha`. It is deliberately not "now": a rebuild of this tag
|
||||
in six months has to hand the compiler the same epoch CI handed it.
|
||||
|
||||
`publish` job (Pi runner) downloads both artifacts, refuses any empty file,
|
||||
and calls `scripts/publish-release.sh` to create-or-update the release with all
|
||||
four Linux assets. If this job fails and the tag was created by *this* run, the
|
||||
final step deletes the incomplete release and the tag. A failed `aarch64` or
|
||||
`x86_64` job always fails `publish`, so nothing is published half-built.
|
||||
`publish` job (Pi runner) downloads both artifacts, stages them into `dist/`,
|
||||
signs every asset with `scripts/sign-release.sh` inside the same digest-pinned
|
||||
builder image, and only then calls `scripts/publish-release.sh` to create-or-update
|
||||
the release with all four Linux assets plus the committed public key. Signing runs
|
||||
in a container fed by a **named volume + `docker cp`**, not a bind mount of the
|
||||
workspace: on this runner `$GITHUB_WORKSPACE` is a path inside the job container,
|
||||
while docker resolves a `-v` source on the host — a bind mount therefore arrives
|
||||
empty and the sign script is missing (run 768). Signing is also staged *after*
|
||||
`dist/` is populated, so the files it signs exist; a run with no
|
||||
`MINISIGN_SECRET_KEY` still stops before anything is uploaded. If this job fails
|
||||
and the tag was created by *this* run, the final step deletes the incomplete
|
||||
release and the tag. A failed `aarch64` or `x86_64` job always fails `publish`, so
|
||||
nothing is published half-built.
|
||||
|
||||
## Android (APK + AAR) on the same tag
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue