Skip to content

fix: resolve release tag from remote when missing locally - #89

Merged
alexhraber merged 1 commit into
mainfrom
fix/release-tag-resolution
Jul 11, 2026
Merged

fix: resolve release tag from remote when missing locally#89
alexhraber merged 1 commit into
mainfrom
fix/release-tag-resolution

Conversation

@alexhraber

Copy link
Copy Markdown
Owner

Problem

The release step resolves the version from git tag -l, which only finds tags present in the local checkout. Since the release step may run on a different Buildkite agent than the tag step, the freshly-created tag is missing — resulting in no tag found and no GitHub release.

Closes #88.

Fix

Added a 3-tier fallback chain:

  1. BUILDKITE_TAG — populated for tag-push builds (fast path).
  2. git fetch --tags origin + git tag -l — pulls remote tags into the local clone first.
  3. git ls-remote --tags origin — queries the remote directly (works regardless of local state).

If all three fail, the step exits silently (no tag = nothing to release).

The release step may run on a different agent than the tag step, so
git tag -l finds nothing in a fresh shallow checkout. Add a 3-tier
fallback chain: BUILDKITE_TAG, git fetch --tags + git tag -l, and
git ls-remote --tags as final fallback.
@alexhraber
alexhraber merged commit 27cc43e into main Jul 11, 2026
1 of 2 checks passed
@alexhraber
alexhraber deleted the fix/release-tag-resolution branch July 11, 2026 07:20
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.

release step: no tag found — git tag not available on release agent

1 participant