Skip to content

ci: add a workflow to publish snapshot builds - #1807

Merged
dkhawk merged 1 commit into
mainfrom
ci/publish-snapshot
Oct 1, 2026
Merged

dkhawk merged 1 commit into
mainfrom
ci/publish-snapshot

Conversation

@kikoso

@kikoso kikoso commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds publish-snapshot.yml, a manual workflow that publishes a -SNAPSHOT build of every module to the Maven Central snapshot repository (https://central.sonatype.com/repository/maven-snapshots/).

  • Takes a version input and fails unless it ends with -SNAPSHOT.
  • Sets the version only inside the run (build.gradle.kts is edited in the runner), so nothing is tagged, committed or released, and it can be re-run with the same version.
  • Uses the same Maven Central credentials and signing setup as publish.yml. Vanniktech routes -SNAPSHOT versions to the snapshot repository instead of a release.
  • Runs on macos-latest so 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:

gh workflow run publish-snapshot.yml --ref feat/experimental-kmp-clustering -f version=6.1.0-SNAPSHOT

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.android namespace in the Central Portal. Without it the publish step fails with an authorization error.

Testing

The YAML parses. On #1774 a 6.1.0-SNAPSHOT build publishes cleanly to a local Maven repository, and Vanniktech 0.37 sends -SNAPSHOT versions to the Central snapshot URL. The workflow itself can only be exercised once it is on main.

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.
@googlemaps-bot

Copy link
Copy Markdown
Contributor

Code Coverage

Overall Project 56.95% 🍏

There is no coverage information present for the Files changed

@kikoso
kikoso marked this pull request as ready for review October 1, 2026 16:04
@kikoso
kikoso requested a review from a team as a code owner October 1, 2026 16:04
@dkhawk
dkhawk merged commit 145d2fa into main Oct 1, 2026
12 checks passed
@dkhawk
dkhawk deleted the ci/publish-snapshot branch October 1, 2026 18:11
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.

3 participants