ci: fail the release when an asset is attached unsigned - #406
Conversation
The attach jobs collect `target/*.jar.asc` with `|| true`, so a signing step that produced nothing yields an attach that looks complete and is not: the jars land on the release without a signature and nothing says so. The obvious fix -- verify, refuse to attach -- would defeat the reason both attach jobs run on a failed publish job in the first place: when Central is unreachable, the GitHub assets are the only way to get the build output at all, so withholding them over a missing signature is the worst outcome available. So the check is split around the upload: report before it (never exits non-zero, one annotation per unsigned jar, count written to the step output), upload unconditionally, assert after it. Assets always land; an unsigned release is loudly red instead of quietly wrong. -1 distinguishes "nothing was collected at all" from a signing failure. Byte-identical with the copies in the sibling repos; see workspace/policies/fat-jar-release-assets.md.
Review SummaryApproach: ✅ The PR implements a sound safety check for unsigned release assets. The three-step pattern (report → upload → fail) ensures assets are never lost while making unsigned releases loudly visible. Code Quality: ✅ The shell scripts are clean, readable, and follow best practices:
Strengths
Minor Observations
Verification
Recommendation: Ready to merge. The philosophy (attach first, fail after) is well-reasoned and the implementation is solid. |
Inline NotesLine: This is well-designed: the Line: Correct use of Line: Proper GitHub Actions idiom. The variable will be available to downstream steps as |
|



Summary
target/*.jar.ascwith|| true, so a signing step that produced nothing yields an attach that looks complete and is not: the jars land on the release without a signature and nothing says so.::error::per unsigned jar, count to$GITHUB_OUTPUT), upload unconditionally, assert after it. Assets always land; an unsigned release is loudly red instead of quietly wrong.-1distinguishes "nothing was collected at all" from a signing failure.Applied to
github-snapshotandgithub-release-signed. The two steps are byte-identical with the copies now in srcmorph, BitcoinAddressFinder and streambuffer — verified by normalising the asset-directory name and hashing; sync any future edit to all four.Test plan
publish.ymlparses as YAML; the job graph is unchanged apart from the two added stepsworkspace/policies/fat-jar-release-assets.md("Attach first, then go red"), updated in the companion workspace PRNothing here can be exercised without a real
publish_to_centraldispatch, so the change is deliberately shaped so that its failure mode is "job red after the assets are attached" rather than "assets missing".Related issues / PRs
Cross-repo rollout; companion PRs in
srcmorph,BitcoinAddressFinder,streambufferandworkspace.Checklist
CONTRIBUTING.mdandCODE_OF_CONDUCT.mdGenerated by Claude Code