Skip to content

Publish SNAPSHOT versions to GitHub Packages instead of Maven Central#3647

Draft
AlvaroBrey wants to merge 4 commits into
mainfrom
snapshot-github-packages
Draft

Publish SNAPSHOT versions to GitHub Packages instead of Maven Central#3647
AlvaroBrey wants to merge 4 commits into
mainfrom
snapshot-github-packages

Conversation

@AlvaroBrey

@AlvaroBrey AlvaroBrey commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

WIP


Note

Medium Risk
Changes artifact distribution for every snapshot deploy and consumer repo config; release paths are gated on version suffix and Central tasks are disabled for snapshots, but CI credential or task misconfiguration could break mainline snapshot publishing.

Overview
-SNAPSHOT builds now publish to GitHub Packages instead of Maven Central; release publishing is unchanged.

Gradle convention adds configureSnapshotPublishing() for public library modules: when VERSION_NAME ends in -SNAPSHOT, it registers https://maven.pkg.github.com/RevenueCat/purchases-android and disables Maven Central publish tasks so snapshots cannot ship to Central.

Fastlane deploy picks credentials and Gradle publish tasks by version—snapshots use publishAllPublicationsToGitHubPackagesRepository with GitHub Packages env vars and skip GitHub release creation; releases still use Maven Central and publish.

CircleCI snapshot workflows add the github-packages-publishing context for deploy and for sample apps that resolve snapshot dependencies after deploy. Example apps switch their snapshot Maven repo from Sonatype to GitHub Packages with the same credential properties/env vars.

RELEASING.md documents snapshot behavior, PAT scopes, and consumer Gradle setup.

Reviewed by Cursor Bugbot for commit f57cba5. Bugbot is set up for automated code reviews on this repo. Configure here.

@AlvaroBrey AlvaroBrey self-assigned this Jun 25, 2026
@AlvaroBrey AlvaroBrey force-pushed the snapshot-github-packages branch 3 times, most recently from 64bf7f8 to f57cba5 Compare June 25, 2026 09:23
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.27%. Comparing base (aff4907) to head (6754289).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3647   +/-   ##
=======================================
  Coverage   80.27%   80.27%           
=======================================
  Files         379      379           
  Lines       15557    15557           
  Branches     2170     2170           
=======================================
  Hits        12489    12489           
  Misses       2203     2203           
  Partials      865      865           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread .circleci/config.yml
- deploy-snapshot:
context: maven-central-publishing
context:
- maven-central-publishing

@AlvaroBrey AlvaroBrey Jun 25, 2026

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.

Both contexts because we need the signing keys. We also could just not sign snapshots TBH.

@AlvaroBrey

Copy link
Copy Markdown
Contributor Author

@cursor review pls

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f57cba5. Configure here.

configureAndroidLibrary()
configureApisFlavors()
configureConditionalPublishing()
configureSnapshotPublishing()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

BOM and codegen skip snapshot publish

Medium Severity

configureSnapshotPublishing() is only invoked from the public library convention plugin, while :bom and :codegen apply com.vanniktech.maven.publish on their own. Snapshot deploy now runs publishAllPublicationsToGitHubPackagesRepository instead of publish, so purchases-bom and purchases-codegen-plugin are not published to GitHub and still have Maven Central publish tasks enabled.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f57cba5. Configure here.

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.

Fixed

@AlvaroBrey AlvaroBrey force-pushed the snapshot-github-packages branch from f57cba5 to 6754289 Compare June 25, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant