Repository navigation
build: Deploy releases to GitHub Packages as well as Maven Central - #453
Merged
Merged
Conversation
Signed-off-by: Ferenc Csaky <ferenc@datasqrl.com>
4 of 16 tasks
…elease is there Signed-off-by: Ferenc Csaky <ferenc@datasqrl.com>
velo
approved these changes
Nov 17, 2026
Signed-off-by: Ferenc Csaky <ferenc@datasqrl.com>
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.
Why
Maven Central rejected the 0.12.5 release. The bundle uploaded (deployment
cf910027-3314-4816-a086-bd9ecb8a4808) and then failed while publishing, because thecom.datasqrlnamespace is over Sonatype's monthly cap. As a result, 0.12.5 isn't in any Maven repository:mainsnapshots.Deploy to GitHub Packagesonly runs whengithub.ref_name == 'main', so it was skipped in the 0.12.5 run.distributionManagementalso only has asnapshotRepository.SQRL can't build against a runner release until it's in a Maven repository.
Changes
pom.xmlgithub-releaseprofile. 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-versionmvn deployfails with "repository element was not specified".releaseis renamed tocentral-release.skipTests,skipITsanddocker.skip, so their deploy commands no longer pass-DskipTests..github/workflows/ci.ymlmaven-deployrunsDeploy release to GitHub Packages(mvn -B clean deploy -Pci,github-release) and thenDeploy 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.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.mainsnapshot deploy is unchanged apart from its new name,Deploy snapshot to GitHub Packages.stdlib-utils. That's all it takes to run the runner on a Flink cluster other than our image:stdlib-utilsis 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.postgresql-connectoralone needsstdlib-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-releaseinto a local file repository, through-DaltReleaseDeploymentRepository:BUILD SUCCESSin 39 s, with no tests run, the Docker exec skipped and the shaded jar attached.flink-sql-runner-<ver>-flink-2.3.jar.-Dgpg.skipand-Dlicense.skipwere needed locally only. There's no signing in a scratch build, and the license check needs.git, which the copy didn't have.https://maven.pkg.github.com/DataSQRL/flink-sql-runneronly with-Pgithub-release. With no profile or with-Pcentral-releaseit's unset, and a release-versionmvn deployfails with "repository element was not specified" before uploading anything.mvn verify -pl stdlib/stdlib-math -amwith each release profile and no-DskipTests:BUILD SUCCESS, no tests run.flink-sql-runner-dependencies-<ver>.pom, after the previous module's uber jar.deployAtEndwould make the order explicit, but it isn't used: with it, theflinkrunner-bomthatsundr-maven-plugingenerates is never uploaded.Deploy release to GitHub Packagesscript, run against stubcurlandmvn: a release that's already there skips the deploy, a missing one gets deployed, and a failed deploy exits 1.spotless:checkpasses, 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:packagesgets 401, which the check treats as missing, so it deploys.Follow-ups
release-0.12, and a tag build uses that commit's workflow, so this needs backporting there.mvn -B versions:set -DnewVersion=0.12.5, followed bymvn -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