Skip to content

feat: Add GitHub release workflow publishing to Maven Central - #1393

Open
ZPascal wants to merge 2 commits into
cloudfoundry:5.x.xfrom
ZPascal:release-workflow-5.x.x
Open

ZPascal wants to merge 2 commits into
cloudfoundry:5.x.xfrom
ZPascal:release-workflow-5.x.x

Conversation

@ZPascal

@ZPascal ZPascal commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

This moves the 5.x.x release from Concourse to GitHub Actions.

There is a new release.yml workflow that you start by hand on 5.x.x. You give it the release version and the next snapshot version. It then:

  • creates the release and snapshot commits with ci/create-release.sh
  • pushes the tag
  • deploys the tagged release to Maven Central
  • pushes the new snapshot version to 5.x.x
  • creates a GitHub release

The tag goes out before the deploy because a release on Maven Central can't be taken back. If the deploy fails, delete the tag again.

The dry-run input is on by default. Then the workflow only uploads the bundle to the Central Portal and waits for validation, without publishing it, and skips the pushes and the GitHub release. You can look at the bundle in the portal and drop it there. For a real release, untick it.

It only runs on 5.x.x for now. main builds with Java 17 and still uses the Artifactory plugin, so it needs its own change.

In the parent pom.xml I swapped artifactory-maven-plugin for central-publishing-maven-plugin. The Artifactory plugin was only there for the Concourse promote step.

Before the first run:

  • Repo secret CENTRAL_USERNAME (Central Portal user token name)
  • Repo secret CENTRAL_PASSWORD (Central Portal user token)
  • Repo secret MAVEN_GPG_PRIVATE_KEY (armored private key used to sign)
  • Repo secret MAVEN_GPG_PASSPHRASE (passphrase of that key)
  • org.cloudfoundry namespace verified in the Central Portal
  • Branch protection on 5.x.x lets the workflow push

I haven't run the workflow yet. I only checked that the YAML parses and ./mvnw validate passes. The old Concourse scripts in ci/ are removed; only create-release.sh is kept, since the workflow uses it.

@ZPascal
ZPascal marked this pull request as draft October 27, 2026 20:39
@ZPascal
ZPascal force-pushed the release-workflow-5.x.x branch 2 times, most recently from 9be424e to f8a2418 Compare October 27, 2026 21:03
@ZPascal ZPascal changed the title ci: Add GitHub release workflow publishing to Maven Central feat: Add GitHub release workflow publishing to Maven Central Oct 27, 2026
@ZPascal
ZPascal marked this pull request as ready for review October 27, 2026 21:21
@ZPascal

ZPascal commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

@Kehrlann Do you've any update?

Replace the Concourse release pipeline with a manually triggered workflow
that creates the release and snapshot commits, signs and deploys to Maven
Central via the Central Portal, pushes the tag and creates a GitHub release.
Swap artifactory-maven-plugin for central-publishing-maven-plugin.
@ZPascal
ZPascal force-pushed the release-workflow-5.x.x branch from f8a2418 to d5d6551 Compare December 3, 2026 20:36
- Only run on 5.x.x. main builds with Java 17 and still uses
  artifactory-maven-plugin, so a release from there would fail or not
  reach Maven Central.
- Push the tag before deploying and the development version after it.
  A release on Maven Central can't be taken back, so a later push
  failure, for example because 5.x.x moved during the run, must not
  leave a published release without its tag.
- Add a dry-run input, on by default. It uploads the bundle with
  autoPublish=false and waits only for validation, and skips all
  pushes and the GitHub release.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant