If your repo already releases through this library, bumping the pinned :git/sha changes
nothing about how you release. Signing, the SBOM, and post-publish verification all
arrived after the first repositories onboarded, and all of them are opt-in. A clojars
environment holding only CLOJARS_USERNAME and CLOJARS_PASSWORD is still sufficient.
That is a deliberate constraint on this library: a consumer pins it by sha, so a sha bump
taken for an unrelated fix must not turn into a failed release. If you want the new
features you ask for them, in deps.edn, one at a time.
What you get for free on a sha bump, with no configuration:
- Post-publish verification. After publishing, the release re-fetches the artifact from Clojars and compares digests before tagging. No secrets, no config.
- A digest record. Every artifact's SHA-256 goes into the job summary and the release tag's message, so "what bits did we ship" is answerable from a clone alone.
- A reproducible jar. Entry order and timestamps are normalized, so two builds of the same source produce byte-identical jars.
- Multi-workflow CI gating, if you want it.
:ci-workflowstill accepts a single string and still gates exactly as before; it also accepts a vector now, where all named workflows must be green. Adopting["test.yml" "security.yml"]is an optional, separate decision.
Signing is the one feature with a setup cost, because it needs secrets that a repo onboarded before it existed does not have. Do these in order.
- Add the two
GPG_*secrets to theclojarsenvironment first —GPG_PRIVATE_KEYandGPG_PASSPHRASE, on the environment and never at repository level. See signing. If you are generating the key now, follow the export verification there rather than trusting that the export worked; a silently broken export fails inside a release. - Add the two secrets to the publish step's
envinrelease.yml. See releasing → adding signing. - Then set
:sign truein:exec-args. In that order: with the flag set and the secrets missing,deployaborts at the signing-key gate — safely, before anything is built, naming both variables — but it is a failed release attempt you did not need to have.
If a release does abort there, the fix is either to finish adding the secrets or to drop
:sign again. The abort message says both.
- Set
:sbom truein:exec-args. No secrets required. - Optionally add the
attest-sbomstep torelease.yml— see releasing → adding attestations.
Order matters in the other direction here: do not add the attest-sbom step before
setting :sbom true. Without the flag there is no target/*-cyclonedx.json for it to
read, so the step fails after the artifact is already live on Clojars.
Attestations are workflow-level, not library-level, so they are independent of both flags —
though attest-sbom specifically needs :sbom. Add id-token: write and
attestations: write to permissions: and the attestation steps after the publish step;
see releasing → adding attestations. Without both
permissions the steps fail after the publish has already happened.
A repo using the escape hatch needs no changes either: :sign! and
:artifacts are optional thunks, and a script that passes neither keeps releasing exactly
as it did. Supplying them is how that script opts in — and if you write your own
:publish!, read
the signatures warning
before turning on signing.