Skip to content

fix(release): publish draft release without checkout#359

Merged
SantiagoDePolonia merged 1 commit into
mainfrom
fix/release-publish-no-checkout
May 28, 2026
Merged

fix(release): publish draft release without checkout#359
SantiagoDePolonia merged 1 commit into
mainfrom
fix/release-publish-no-checkout

Conversation

@SantiagoDePolonia
Copy link
Copy Markdown
Contributor

@SantiagoDePolonia SantiagoDePolonia commented May 28, 2026

Summary

  • Pass --repo "$GITHUB_REPOSITORY" to gh release edit in the release publish job.
  • Removes the publish step dependency on a checked-out .git directory.

Context

The v0.1.34 release run failed in Publish GitHub release with:

failed to run git: fatal: not a git repository (or any of the parent directories): .git

Failed run: https://github.com/ENTERPILOT/GoModel/actions/runs/26556449768

Verification

  • go run github.com/rhysd/actionlint/cmd/actionlint@latest .github/workflows/release.yml
  • git diff --check

Summary by CodeRabbit

  • Chores
    • Improved release workflow automation for better verification and publishing accuracy.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 14cbf4db-44fa-4777-a8be-2f40b46164ee

📥 Commits

Reviewing files that changed from the base of the PR and between 666066b and 31d14d8.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

📝 Walkthrough

Walkthrough

The pull request modifies the release workflow to publish drafted releases with tag verification enabled. The "Publish drafted release" step in the github-release job is updated to invoke gh release edit --verify-tag --draft=false for tag verification and draft status removal.

Changes

Release Publication Workflow

Layer / File(s) Summary
Release publication step with tag verification
.github/workflows/release.yml
The "Publish drafted release" step is updated to run gh release edit --verify-tag --draft=false on the current ref and repository to publish releases with tag verification.

Possibly Related PRs

  • ENTERPILOT/GoModel#273: Both PRs modify the release workflow's GitHub release publishing flow; this PR adds tag verification to the publication step, while the related PR adjusts the broader release publishing sequence.

Poem

🐰 A tag to verify, a draft to release,
One tiny tweak brings the workflow some peace,
With --verify-tag standing guard,
Our releases now land without a shard! 🎉

Estimated Review Effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: fixing the release workflow to publish a draft release without requiring a git checkout.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/release-publish-no-checkout

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 28, 2026

Greptile Summary

This PR updates the release workflow publish step. The main change is:

  • Passes --repo "$GITHUB_REPOSITORY" to gh release edit so the command does not depend on a checked-out .git directory.

Confidence Score: 4/5

This should be fixed before merging.

  • The publish step can still fail before releasing the draft.

  • The new --repo argument addresses repository discovery, but the command still includes an unsupported edit flag.

  • .github/workflows/release.yml publish command.

Important Files Changed

Filename Overview
.github/workflows/release.yml Updates the GitHub release publish command to specify the repository explicitly.

Reviews (1): Last reviewed commit: "fix(release): publish draft release with..." | Re-trigger Greptile

env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release edit "$GITHUB_REF_NAME" --draft=false --verify-tag
run: gh release edit "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --draft=false --verify-tag
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Remove unsupported flag

gh release edit does not accept --verify-tag; that option is not listed for the edit command. On the tag publish path, this step can still fail during CLI argument parsing before the draft release is published, even though --repo now avoids local .git discovery.

Suggested change
run: gh release edit "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --draft=false --verify-tag
run: gh release edit "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --draft=false

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked this against the current GitHub CLI docs and local gh help. gh release edit does support --verify-tag, and --repo is an inherited flag for selecting the repository:

I also ran this from /tmp, outside any git repository:

gh release edit __gomodel_probe_missing_release__ --repo ENTERPILOT/GoModel --draft=false --verify-tag

It accepted the flags and failed with release not found, not an unknown flag or .git discovery error. Leaving the command unchanged.

@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@SantiagoDePolonia SantiagoDePolonia merged commit 670d47f into main May 28, 2026
18 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