ci: add a workflow to publish snapshot builds - #1807
Merged
Merged
Conversation
publish-snapshot.yml is a manual workflow that publishes a -SNAPSHOT version of every module to the Maven Central snapshot repository. It rejects versions that do not end with -SNAPSHOT, sets the version only inside the run, and does not tag, commit or create a release, so it can be run repeatedly with the same version. It runs on macos-latest so it can also publish the iOS klibs of the Kotlin Multiplatform modules when run against a branch that has them.
Contributor
Code Coverage
|
dkhawk
approved these changes
Oct 1, 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.
Summary
Adds
publish-snapshot.yml, a manual workflow that publishes a-SNAPSHOTbuild of every module to the Maven Central snapshot repository (https://central.sonatype.com/repository/maven-snapshots/).versioninput and fails unless it ends with-SNAPSHOT.build.gradle.ktsis edited in the runner), so nothing is tagged, committed or released, and it can be re-run with the same version.publish.yml. Vanniktech routes-SNAPSHOTversions to the snapshot repository instead of a release.macos-latestso it can also publish the iOS klibs of the Kotlin Multiplatform modules.Why a separate PR
GitHub only allows dispatching a workflow that exists on the default branch. With this on
main, a snapshot of the KMP work in #1774 can be published by running the workflow against its branch:The same file is also part of #1774, so the two will not conflict.
Prerequisite
Snapshot publishing must be enabled for the
com.google.maps.androidnamespace in the Central Portal. Without it the publish step fails with an authorization error.Testing
The YAML parses. On #1774 a
6.1.0-SNAPSHOTbuild publishes cleanly to a local Maven repository, and Vanniktech 0.37 sends-SNAPSHOTversions to the Central snapshot URL. The workflow itself can only be exercised once it is onmain.