Repository navigation
Publish every build to GitHub Packages, and only full releases to Maven Central - #630
Merged
Merged
Conversation
…en Central Every push to main and release/* now publishes all modules to GitHub Packages (https://maven.pkg.github.com/dbos-inc/dbos-transact-java) with the workflow's GITHUB_TOKEN. Only a full release (a bare X.Y.Z, i.e. a tagged release/* commit) also publishes to Maven Central. Milestones and release candidates no longer go to Central; the ones already there stay. The Publish workflow splits into build, publish-github-packages, publish-maven-central and release jobs, so a failed publish can be retried with "Re-run failed jobs" without re-publishing to the registry that already succeeded. The GitHub Release now waits for the Maven Central publish. DEVELOPING.md documents where builds go, how to consume a milestone (a classic token with read:packages), and that a patch release reaches Maven Central only by running Publish by hand, since pushing a tag alone doesn't trigger a build.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Publishing can recalculate a different version, and retries can fail after partial module publication.
2 open issues
What changed in this PR
Routes Java module builds to GitHub Packages while reserving Maven Central for full releases.
Changes:
- Separates build, registry publishing, and GitHub Release jobs.
- Adds GitHub Packages credentials and workflow permissions.
- Documents preview consumption and manual patch publishing.
| File | Description |
|---|---|
| DEVELOPING.md | Documents publishing destinations, authentication, and patch releases. |
| build-logic/src/main/kotlin/dbos.publishing-conventions.gradle.kts | Adds the GitHub Packages publishing repository. |
| .github/workflows/publish.yml | Splits publishing jobs and limits Central publishing to full releases. |
| .github/workflows/on_push.yml | Grants the reusable workflow publishing permissions. |
Review effort: Balanced
kraftp
approved these changes
Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Every push to
mainandrelease/*now publishes all modules to GitHub Packages (https://maven.pkg.github.com/dbos-inc/dbos-transact-java) with the workflow'sGITHUB_TOKEN. Only a full release (a bareX.Y.Z, i.e. a taggedrelease/*commit) also goes to Maven Central. Milestones (-mN) and release candidates (-rcN) stop going to Central; the ones already there stay.Changes
dbos.publishing-conventionsadds aGitHubPackagespublishing repository. Its credentials come from theGitHubPackagesUsername/GitHubPackagesPasswordGradle properties, and are required only when a GitHub Packages publish task runs, sobuildandpublishToMavenLocalare unaffected.publish.ymlsplits into four jobs:build: assembles, computes the version, uploads the jars;publish-github-packages: everymainandrelease/*build;publish-maven-central: full releases only, signed as before;release: the GitHub Release, now after the Maven Central publish.Each registry is its own job, so "Re-run failed jobs" retries only the publish that failed. Neither registry accepts a version twice, so a combined job couldn't be rerun after one of them succeeded.
on_push.ymlgrants the publish callcontents: writeandpackages: write, since a called workflow can't have more permissions than its caller.DEVELOPING.mdcovers:read:packages, plus the repository block;Publishrun, becausecreateRelease --pushon a release branch pushes only a tag, which triggers nothing.Notes
dev.dbos:transact:+from Maven Central alone will stop seeing new milestones; the Conductor, Cloud and interop test apps need the repository added. The demo apps pin releases, andtest_demo_apps.ymluses Maven Local, so neither changes.🤖 Generated with Claude Code