Automated publishing of Apache Maven releases to SDKman.
Publishing new Apache Maven releases to SDKman currently depends on a single person manually triggering an API call. This repository provides a GitHub Actions workflow to make the process more resilient, accessible, and auditable.
See Discussion #156 for the full proposal.
The publish workflow derives a download URL from the version number, verifies the archive exists on repo.maven.apache.org, then calls the SDKman vendor API to register the release. It can optionally set the version as the SDKman default.
There are two ways to trigger a publication:
- Workflow dispatch — maintainers trigger it manually via the GitHub Actions UI with a version input
- PR-based — contributors update
versions/maven.jsonin a PR; a verification workflow validates the version on the PR, and merging tomaintriggers the publication
Both paths use the official sdkman-release-action and sdkman-default-action.
The following repository secrets must be configured:
SDKMAN_CONSUMER_KEY— your SDKman vendor API consumer keySDKMAN_CONSUMER_TOKEN— your SDKman vendor API consumer token
- Go to Actions → Publish Maven to SDKman
- Click Run workflow
- Enter the Maven version (e.g.,
4.0.0) - Choose whether to set it as the SDKman default
- Click Run workflow
- Fork this repository (or create a branch)
- Edit
versions/maven.jsonwith the new version:{ "version": "4.0.0", "make_default": true } - Open a pull request — CI automatically verifies the version format and download URL
- A maintainer reviews and merges — the
publishworkflow triggers automatically
The download URL is derived automatically from the version:
https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/{version}/apache-maven-{version}-bin.zip
The workflow verifies the URL exists before publishing to SDKman.
- Multiple versions in parallel: Currently, the version file holds a single version. If Maven 3 and Maven 4 need to be published independently, separate branches (e.g.,
maven-3,maven-4) could each maintain their ownversions/maven.json. The manual workflow dispatch already supports publishing any version independently.
This project is licensed under the Apache License 2.0.