Repository navigation
Description
Description
The "Verify draft GitHub Release exists" step in promote-release.yml uses gh api "repos/${GITHUB_REPOSITORY}/releases/tags/${VERSION}" to check for the draft release. The GitHub API endpoint GET /repos/{owner}/{repo}/releases/tags/{tag_name} does not return draft releases — it returns 404 for them.
The draft release exists (confirmed via gh release list and the list releases API), but this specific endpoint cannot find it.
Two files are affected:
- Upstream —
.github/workflows/promote-release.ymlline 163 (validate job, "Verify draft GitHub Release exists" step) - Downstream template —
assets/workspace/.github/workflows/promote-release.ymlline 99 (identical step, identical bug)
Additionally, both files use the same endpoint in the cleanup job to decide whether RC tags have a GitHub Release before deleting them (upstream line 589, downstream line 405). In practice RC tags don't have draft releases, so this is not a blocking failure, but it is the same incorrect API call and should be corrected for robustness.
Steps to Reproduce
- Complete the
release.ymlworkflow for version0.3.2(creates GHCR images + draft GitHub Release) - Run
just promote-release 0.3.2 - Observe the "Validate promote prerequisites" job fails at step "Verify draft GitHub Release exists"
Expected Behavior
The validate step should find the existing draft release and proceed to the promote phase.
Actual Behavior
The step returns ERROR: No GitHub Release for tag 0.3.2 with a 404 from the API, even though the draft release exists.
Environment
- Workflow:
.github/workflows/promote-release.yml - Runner: ubuntu-22.04
- GitHub Actions runner: 2.333.1
Affected Lines
| File | Line | Step | Severity |
|---|---|---|---|
.github/workflows/promote-release.yml |
163 | Verify draft GitHub Release exists | Blocks promote |
assets/workspace/.github/workflows/promote-release.yml |
99 | Verify draft GitHub Release exists | Blocks promote |
.github/workflows/promote-release.yml |
589 | Delete git RC tags without GitHub Release | Low (cleanup correctness) |
assets/workspace/.github/workflows/promote-release.yml |
405 | Delete git RC tags without GitHub Release | Low (cleanup correctness) |
Possible Solution
Replace the per-tag API call with a query that can find draft releases, e.g.:
gh api "repos/${GITHUB_REPOSITORY}/releases" --jq ".[] | select(.tag_name == \"${VERSION}\")", orgh release view "$VERSION" --json draft,tagName
Changelog Category
Fixed
- TDD compliance (see
.cursor/rules/tdd.mdc)
Activity
c-vigo commentedon Apr 8, 2026
Manual promote completed for 0.3.2
The `promote-release` workflow failed earlier due to the draft-release API bug described in this issue. The promote steps were executed manually:
The workflow bug (using `/releases/tags/{tag}` which returns 404 for draft releases) is still open for a code fix in `promote-release.yml`.
fix(ci): resolve draft releases via list API in promote-release
fix(ci): pipe releases through standalone jq to fix --arg usage
fix: resolve draft releases in promote-release validation (#510)
chore: release 0.3.3 (#131)
chore: release 0.3.3 (#134)
chore: release 0.3.3 (#516)