Merged
Conversation
brian-lou
approved these changes
Mar 9, 2026
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.
The checkout action by default does not fetch the tags. This breaks our filtering logic leading to releases failing trying to republish unreleased tags.
Greptile Summary
This PR fixes a bug in the
publishCI job whereactions/checkout@v4was not fetching existing git tags. Without tags present locally, thegit tag -l "$tag" | grep -q .guard condition always evaluated to true, causing every package to be treated as newly released and potentially re-published on each run..github/workflows/release.yml): Addsfetch-tags: trueto the checkout step in thepublishjob so that all existing tags are available when the workflow checks whether a package version has already been tagged and released..sampo/changesets/haughty-thunderbearer-tuoni.md): Records apatchbump for all seven managed packages to document this CI-level fix through the release tooling.Confidence Score: 5/5
fetch-tags: true) to the correct checkout step, directly addressing the described bug. The combination offetch-depth: 2(needed forHEAD~1diffing) andfetch-tags: true(needed for tag existence checks) is correct. No logic is altered; the fix only ensures the prerequisite data is available.Important Files Changed
fetch-tags: trueto thepublishjob's checkout step so that existing tags are available when filtering which packages need to be tagged and published.Sequence Diagram
sequenceDiagram participant GH as GitHub Push (main) participant PJ as publish job participant CO as actions/checkout@v4 participant GIT as git (local) participant GHR as GitHub Releases / Tags participant PY as PyPI GH->>PJ: trigger on push to main PJ->>CO: checkout (fetch-depth: 2, fetch-tags: true) CO->>GIT: fetch last 2 commits + ALL existing tags PJ->>GIT: git diff HEAD~1 pyproject.toml (check version changes) alt version changed loop for each package PJ->>GIT: git tag -l "name@version" alt tag does NOT exist (new release) PJ->>GIT: git tag "name@version" PJ->>GHR: git push --tags PJ->>GHR: gh release create else tag already exists (previously released) PJ-->>PJ: skip (no duplicate publish) end end PJ->>PY: uv publish dist/* endLast reviewed commit: 0176bc0