Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nightly SNAPSHOT release to the GitHub Packages #950

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

krisbanas
Copy link

I came across the discussions under #941 and the issue #769 and had a look at the snapshot releases.

Results

  • A draft of a GitHub Actions pipeline that builds with JDK 17 and publishes to GitHub Packages
    • The pipeline is set to run on cron (1AM) and on new commits to master
  • I tested the publishing to Packages on my fork. .
  • The GitHub Packages repo indexes the artifacts as 3.0.0-SNAPSHOT and keeps them timestamped under the hood.
  • I set up a test Gradle project to test resolving the snapshot, it downloads the most recent artifact (upon forcing it to --refresh-dependencies).

Questions/Issues

  • The pipeline uses altDeploymentRepository flag (see documentation here) to override the repositories defined in pom.xml instead of editing the file itself. The snapshot repo can instead be adjusted in the POM file.
  • GitHub Packages seem not to implement any retention policy for snapshots. It means producing new artifacts every day with no clean-up of older ones. GitHub hints at using a maintenance pipeline to handle it.
  • Compared to what I've found on the maven central repo, the signatures (.asc) files are missing in the Packages.
  • Another issue is lack of support for unauthenticated dependency fetching from the Packages. You need a PAT to authenticate and GitHub is not likely to change it (documentation) (community discussion).
  • Looking at the CI pipeline, the ./mvnw deploy... command in the snapshot release pipeline likely misses some parameters.
  • I will document the process in README if you decide to go with this solution.

Let me know what you think.

@chrjohn
Copy link
Member

chrjohn commented Mar 9, 2025

Thank you @krisbanas , will take a look.

@krisbanas
Copy link
Author

Hi @chrjohn, did you find a moment to have a look?

@chrjohn
Copy link
Member

chrjohn commented Apr 1, 2025

Hi @krisbanas , no unfortunately not. Totally swamped in regular work work. :-/

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.

2 participants