Skip to content

build: Deploy releases to GitHub Packages as well as Maven Central - #453

Merged
ferenc-csaky merged 3 commits into
mainfrom
build/github-packages-releases
Nov 17, 2026
Merged

ferenc-csaky merged 3 commits into
mainfrom
build/github-packages-releases

Conversation

@ferenc-csaky

@ferenc-csaky ferenc-csaky commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Maven Central rejected the 0.12.5 release. The bundle uploaded (deployment cf910027-3314-4816-a086-bd9ecb8a4808) and then failed while publishing, because the com.datasqrl namespace is over Sonatype's monthly cap. As a result, 0.12.5 isn't in any Maven repository:

  • GitHub Packages only gets main snapshots. Deploy to GitHub Packages only runs when github.ref_name == 'main', so it was skipped in the 0.12.5 run. distributionManagement also only has a snapshotRepository.
  • Maven can't resolve the jars that build: Keep the shaded uber jar out of Maven Central releases #450 attaches to the GitHub Release. They have no POMs and aren't in a repository layout.

SQRL can't build against a runner release until it's in a Maven repository.

Changes

pom.xml

  • New github-release profile. It's the only place that declares a release <repository> for GitHub Packages, so a release can't be deployed there by mistake. Without the profile, a release-version mvn deploy fails with "repository element was not specified".
  • release is renamed to central-release.
  • Both release profiles set skipTests, skipITs and docker.skip, so their deploy commands no longer pass -DskipTests.

.github/workflows/ci.yml

  • On a release, maven-deploy runs Deploy release to GitHub Packages (mvn -B clean deploy -Pci,github-release) and then Deploy to Maven Central (mvn -B clean deploy -Pci,central-release). The Central step also runs when only the GitHub Packages step failed, so a failure in one repository doesn't stop the other.
  • On a re-run, the GitHub Packages step skips its deploy if the release is already there, instead of failing because GitHub rejects re-uploaded release files with 409. It checks for flink-sql-runner-dependencies-<ver>.pom. Modules are deployed one after another in reactor order, and that POM-only module is the last one, so a release that was only partly uploaded is deployed again and still fails loudly.
  • The main snapshot deploy is unchanged apart from its new name, Deploy snapshot to GitHub Packages.
  • The GitHub Release now attaches only the uber jar and stdlib-utils. That's all it takes to run the runner on a Flink cluster other than our image:
    • The uber jar shades in every other module.
    • stdlib-utils is the one module it leaves out on purpose, because Flink has to load it from /opt/flink/lib. The image copies it there as well.
    • The other thin jars don't work on their own. For example, postgresql-connector alone needs stdlib-json, stdlib-vector, flexible-json-format, the JDBC connector and the Postgres driver. Library users get these from Maven, along with their dependencies.

Verification

All checks ran on a scratch copy set to a release version (0.0.0-pkgcheck). Nothing was uploaded or installed.

  • mvn clean deploy -Pci,github-release into a local file repository, through -DaltReleaseDeploymentRepository:
    • BUILD SUCCESS in 39 s, with no tests run, the Docker exec skipped and the shaded jar attached.
    • It deployed 52 jars and 24 POMs: jar, sources and javadoc for every module, plus flink-sql-runner-<ver>-flink-2.3.jar.
    • -Dgpg.skip and -Dlicense.skip were needed locally only. There's no signing in a scratch build, and the license check needs .git, which the copy didn't have.
  • The release repository resolves to https://maven.pkg.github.com/DataSQRL/flink-sql-runner only with -Pgithub-release. With no profile or with -Pcentral-release it's unset, and a release-version mvn deploy fails with "repository element was not specified" before uploading anything.
  • mvn verify -pl stdlib/stdlib-math -am with each release profile and no -DskipTests: BUILD SUCCESS, no tests run.
  • Deploy order, in the same kind of dry run: the last file written is flink-sql-runner-dependencies-<ver>.pom, after the previous module's uber jar. deployAtEnd would make the order explicit, but it isn't used: with it, the flinkrunner-bom that sundr-maven-plugin generates is never uploaded.
  • The Deploy release to GitHub Packages script, run against stub curl and mvn: a release that's already there skips the deploy, a missing one gets deployed, and a failed deploy exits 1.
  • spotless:check passes, and the workflow parses.

Not run: the workflow itself, a real upload to GitHub Packages or Central, and the check against a release that's already there. A token without read:packages gets 401, which the check treats as missing, so it deploys.

Follow-ups

  • 0.12.x releases are cut from release-0.12, and a tag build uses that commit's workflow, so this needs backporting there.
  • 0.12.5 isn't on GitHub Packages yet. It can be deployed from its tag with mvn -B versions:set -DnewVersion=0.12.5, followed by mvn -B clean deploy -Pci -DskipTests -DskipITs -Ddocker.skip=true -DaltReleaseDeploymentRepository=github::https://maven.pkg.github.com/DataSQRL/flink-sql-runner. Alternatively, cut 0.12.6 after the backport.

🤖 Generated with Claude Code

Signed-off-by: Ferenc Csaky <ferenc@datasqrl.com>
…elease is there

Signed-off-by: Ferenc Csaky <ferenc@datasqrl.com>
Signed-off-by: Ferenc Csaky <ferenc@datasqrl.com>
@ferenc-csaky ferenc-csaky added this to the 0.12.6 milestone Nov 17, 2026
@ferenc-csaky
ferenc-csaky merged commit b8fbe1d into main Nov 17, 2026
13 checks passed
@ferenc-csaky
ferenc-csaky deleted the build/github-packages-releases branch November 17, 2026 18:21
ferenc-csaky added a commit that referenced this pull request Nov 17, 2026
)

Signed-off-by: Ferenc Csaky <ferenc@datasqrl.com>
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.

2 participants