Skip to content

ci: Publish snapshot builds to Maven Central#1107

Merged
runningcode merged 3 commits intomainfrom
no/publish-snapshots
Mar 25, 2026
Merged

ci: Publish snapshot builds to Maven Central#1107
runningcode merged 3 commits intomainfrom
no/publish-snapshots

Conversation

@runningcode
Copy link
Copy Markdown
Contributor

Summary

  • Adds a mavenCentralSnapshots Maven repository to both plugin-build and sentry-kotlin-compiler-plugin build files
  • Adds a new GitHub Actions workflow (.github/workflows/publish-snapshot.yml) that publishes -SNAPSHOT versions of both plugins on every push to main
  • Snapshot flow is completely independent from the existing craft-based release process

Pre-requisite

Snapshots must be enabled for the io.sentry namespace in the Sonatype Central Portal under Namespaces (one-time manual step).

🤖 Generated with Claude Code

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 13, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Internal Changes 🔧

  • Publish snapshot builds to Maven Central by runningcode in #1107

🤖 This preview updates automatically when you update the PR.

@romtsn
Copy link
Copy Markdown
Member

romtsn commented Mar 16, 2026

not opposed to this, but not sure if there's a company-wide rule not to publish snapshots (don't think we do that for any of our repos). Maybe @BYK knows?

@BYK
Copy link
Copy Markdown
Member

BYK commented Mar 20, 2026

@romtsn we do have nightlies for Craft and the new CLI but we don't use the regular publish flow for these

../gradlew publishAllPublicationsToMavenCentralSnapshotsRepository
-PVERSION_NAME=${{ steps.version.outputs.snapshot_version }}
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL you can do that with env variables 👀

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes to answer your question from a gradle side.

from the gihtub secrets perspective, these are just placeholders. i think unfortunately these variables aren't set. i will ask around tomorrow.

Comment thread .github/workflows/publish-snapshot.yml Outdated
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably needs to be pinned (and setup-java too), following #1116

Copy link
Copy Markdown
Member

@romtsn romtsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@runningcode let's do that! I've enabled snapshots for our namespace already

@runningcode runningcode marked this pull request as ready for review March 25, 2026 09:39
Add a `mavenCentralSnapshots` repository to both plugin-build and
sentry-kotlin-compiler-plugin build files, and a new GitHub Actions
workflow that publishes `-SNAPSHOT` versions on every push to main.

This gives consumers early access to unreleased changes without
waiting for a formal release. The snapshot flow is completely
independent from the existing craft-based release process.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@runningcode runningcode force-pushed the no/publish-snapshots branch from b4188f1 to 0726767 Compare March 25, 2026 09:44
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread .github/workflows/publish-snapshot.yml Outdated
Cancelling a running publish can leave the Maven snapshot repository
in an inconsistent state (e.g. partial artifacts or mismatched plugin
versions between the Gradle Plugin and Kotlin Compiler Plugin).
Queuing instead ensures each publish completes atomically.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
BYK
BYK previously requested changes Mar 25, 2026
Comment thread .github/workflows/publish-snapshot.yml
Comment thread .github/workflows/publish-snapshot.yml
Co-authored-by: Burak Yigit Kaya <byk@sentry.io>
@BYK BYK dismissed their stale review March 25, 2026 10:55

unblocking

@runningcode runningcode merged commit 51c6f70 into main Mar 25, 2026
20 of 21 checks passed
@runningcode runningcode deleted the no/publish-snapshots branch March 25, 2026 13:05
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