Skip to content

fix(ci): wait for release-list propagation before resolving draft tag#163

Merged
ashishkurmi merged 1 commit into
step-security:mainfrom
ashishkurmi:akurmi/fix/release-resolve-draft-race
Jul 9, 2026
Merged

fix(ci): wait for release-list propagation before resolving draft tag#163
ashishkurmi merged 1 commit into
step-security:mainfrom
ashishkurmi:akurmi/fix/release-resolve-draft-race

Conversation

@ashishkurmi

Copy link
Copy Markdown
Member

GoReleaser creates the draft release for a tag pushed earlier in the same job, and GitHub can take a few seconds to index that tag before the new release shows up in the releases-list API. Querying immediately can return an empty list and fail with "Could not find draft release", even though the release was created successfully.

Add a fixed 30s sleep before the lookup to give GitHub's API time to catch up.

What does this PR do?

Type of change

  • Bug fix
  • Enhancement
  • Documentation

Testing

  • Tested on macOS (version: ___)
  • Binary runs without errors: ./stepsecurity-dev-machine-guard --verbose
  • JSON output is valid: ./stepsecurity-dev-machine-guard --json | python3 -m json.tool
  • No secrets or credentials included
  • Lint passes: make lint
  • Tests pass: make test

Related Issues

GoReleaser creates the draft release for a tag pushed earlier in the
same job, and GitHub can take a few seconds to index that tag before
the new release shows up in the releases-list API. Querying
immediately can return an empty list and fail with "Could not find
draft release", even though the release was created successfully.

Add a fixed 30s sleep before the lookup to give GitHub's API time to
catch up.
@ashishkurmi ashishkurmi merged commit 2d2e69f into step-security:main Jul 9, 2026
11 checks passed
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