ci: publish a snapshot on every push to main - #19
Merged
Conversation
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
A push to main publishes a snapshot of the next patch version. Tags still publish releases.
Why
Requiring a
-SNAPSHOTtag was the first attempt at this and it was wrong; kbuild moved off it andthis brings the rest into line. The snapshot step here was gated on the version containing a hyphen
while the only trigger was
tags, so it could only fire for a-SNAPSHOTtag, which nobody creates.The result is that this library has never published a snapshot at all: its metadata is a 404 on the
snapshot repository, while kbuild has four versions there.
That matters because consumers cannot pick up a library change until it is released. kbuild uses its
own snapshots to verify convention changes across six repos before tagging, and the same argument
applies to any library klause consumes.
Shape, matching kbuild
branches: [main]alongside the tag trigger, plus adryRundispatch input that runs the releasebuild and publishes nothing.
next_patch, derived from the newest release tag, so a prerelease tag does notadvance the snapshot line. Checkout needs
fetch-depth: 0to see the tags.already tests the same commit on a main push and a snapshot is not a release.
Testing
The workflow parses, and the version derivation was simulated against the real tag list here.
Not included
The release job still uses plain
setup-javarather thangradle/actions/setup-gradle, so it doesnot read the caches build.yml writes. That mattered little when the job ran on tags alone; now that
it runs on every merge it is worth doing, as a separate change.