Releasing
How the packages are published. Every package publishes from a GitHub Actions workflow when a GitHub Release is published. npm, NuGet and PyPI use trusted publishing (OIDC), so no tokens are stored. Maven Central has no trusted publishing, so publish-maven.yml uses secrets in a protected environment. The Go module is published by a tag, which publish-go.yml pushes.
Order
node scripts/prepare-release.mjs X.Y.Zsets the version everywhere (C#, TypeScript, Python, Java, the demo chart, the bug-report template) and turns the CHANGELOG's "## Unreleased" into the release heading. Open the release PR and merge it.- Publish the GitHub Release
vX.Y.Zfrommain. This runs the npm, NuGet and PyPI workflows, which check the tag against the version and attach attested packages to the Release. - Go: nothing to do.
publish-go.ymlruns on the same Release: it tests the module, pushesgo/vX.Y.Zon the Release's commit and fetches it through the Go module proxy. (For an older release, run it by hand with the release tag.) - Maven Central:
publish-maven.ymlruns on the same Release once you approve the deployment (see below).
Maven Central
Two artifacts, com.metatoy:validonce-core and com.metatoy:validonce-spring, built from java/ (Gradle, JDK 21). The version is version in java/gradle.properties (set by prepare-release.mjs).
publish-maven.yml publishes them when the GitHub Release is published. Maven Central has no token-free trusted publishing, so the job reads secrets from the protected maven-central environment. It is limited to v* tags and needs the founder's approval on every run: open the run and press "Review deployments". The job:
- Checks the tag against
java/gradle.propertiesand runs./gradlew check. - Builds the signed bundle (
./gradlew centralBundle -Pvalidonce.sign), signing in memory with the CI signing key. - Attests it and uploads it to the Central Portal API with
publishingType=AUTOMATIC, then waits until it isPUBLISHED. - Attaches the bundle to the Release.
For an older release, run it by hand with the release tag. CI's java job builds a signed bundle with a throwaway key on every push, so the signing path is tested without the secrets.
Secrets (environment maven-central, set once):
| Secret | What |
|---|---|
MAVEN_SIGNING_KEY | ASCII-armored secret key of the CI signing key (validonce CI <[email protected]>, ed25519, signing only, 2-year expiry). It is not the founder's personal key. Fingerprint E99C AF89 14E0 7E01 A9E9 8782 2CC3 5EBA 34E4 BF91, expires 2028-11-23. Its public key is on keyserver.ubuntu.com and keys.openpgp.org. |
MAVEN_SIGNING_PASSWORD | Its passphrase |
MAVEN_CENTRAL_USERNAME, MAVEN_CENTRAL_PASSWORD | A Central Portal user token (central.sonatype.com, Account, Generate User Token), not the account login |
To rotate either secret: make a new key or token, update the secret, then revoke the old key (publish its revocation) or the old token.
Manual fallback (founder's Mac, signed with the local gpg agent): cd java && ./gradlew centralBundle -Pvalidonce.sign, then upload build/central/validonce-<version>-bundle.zip at https://central.sonatype.com/publishing ("Publish Component"). A published version can't be changed or removed.