Skip to content

ci(release): checkout repository before creating release#2

Merged
bochkov-anton merged 1 commit intomainfrom
ci/fix-release-workflow-checkout
Apr 24, 2026
Merged

ci(release): checkout repository before creating release#2
bochkov-anton merged 1 commit intomainfrom
ci/fix-release-workflow-checkout

Conversation

@bochkov-anton
Copy link
Copy Markdown
Contributor

Title:
ci(release): checkout repository before creating release

Body:

Summary

Fixes the tag-driven release workflow by checking out the repository before running gh release create --verify-tag or any git-based validation.

The previous workflow failed because GitHub CLI attempted to run git commands in a job workspace that did not contain a .git directory.

Changes

  • Adds actions/checkout@v5 to the release job.
  • Uses fetch-depth: 0 so release validation has access to repository history and tags.
  • Preserves the existing tag-driven release model.
  • Preserves idempotent GitHub Release creation behavior.

Release behavior

This change does not make the workflow create tags automatically.

The release flow remains:

  1. merge changes into protected main;
  2. create a SemVer tag from main;
  3. push the tag;
  4. let release.yml create the GitHub Release.

Validation

  • go test ./...
  • Release workflow YAML inspected
  • Existing release model preserved

Notes

The failed release can be rerun after this fix is merged into main, if GitHub uses the updated workflow definition for the tag run. If rerun still uses the old workflow definition, create a new patch tag from main.

@bochkov-anton bochkov-anton merged commit 7a95124 into main Apr 24, 2026
21 checks passed
@bochkov-anton bochkov-anton deleted the ci/fix-release-workflow-checkout branch April 24, 2026 11:29
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.

1 participant