fix(ci): goreleaser config works - #25
Conversation
Signed-off-by: Calum Murray <cmurray@redhat.com>
📝 WalkthroughWalkthroughThe pull request refactors the nightly release workflow by consolidating the cleanup-and-delete flow into a single direct release creation step with integrated artifact uploading. Additionally, goreleaser configuration is adjusted to ignore nightly tags and remove the dedicated nightly release block, switching to snapshot mode with clean and skip-publish flags. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/nightly.yaml:
- Around line 75-81: Move the "Prepare nightly release" step (the job step named
"Prepare nightly release") so it runs after the GoReleaser step completes
successfully and before any artifact upload/publishing steps; this means
removing the GH release/tag creation from its current pre-build position and
inserting it immediately after the GoReleaser step in the job flow so tag
creation only occurs when the build step (GoReleaser) has succeeded and before
uploading artifacts or marking the release as complete.
| - name: Prepare nightly release | ||
| run: | | ||
| # Delete existing nightly release if it exists | ||
| if gh release view nightly >/dev/null 2>&1; then | ||
| echo "Deleting existing nightly release" | ||
| gh release delete nightly --yes | ||
| fi | ||
|
|
||
| # Delete existing nightly tag if it exists | ||
| if git rev-parse --verify nightly >/dev/null 2>&1; then | ||
| echo "Deleting existing nightly tag" | ||
| git tag -d nightly | ||
| git push origin :refs/tags/nightly 2>/dev/null || true | ||
| fi | ||
| gh release delete nightly --yes --cleanup-tag || true | ||
| gh release create nightly \ | ||
| --title "Nightly ($(date -u +%Y-%m-%d) - $(git rev-parse --short HEAD))" \ | ||
| --generate-notes \ | ||
| --prerelease |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# First, let's read the nightly.yaml workflow file to understand its full structure
cat -n .github/workflows/nightly.yamlRepository: mcpchecker/kubernetes-extension
Length of output: 4027
Move the "Prepare nightly release" step to run after GoReleaser completes.
The workflow currently creates the nightly tag before running GoReleaser (line 75–81 before line 93–99). If GoReleaser fails, the nightly tag is already pointing to the current commit. The skip gate at lines 54–57 will prevent retries for the same commit, leaving a broken nightly release in place.
Move the "Prepare nightly release" step to after the build succeeds and before artifacts are uploaded so that tag mutations only occur when all build steps have passed.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/nightly.yaml around lines 75 - 81, Move the "Prepare
nightly release" step (the job step named "Prepare nightly release") so it runs
after the GoReleaser step completes successfully and before any artifact
upload/publishing steps; this means removing the GH release/tag creation from
its current pre-build position and inserting it immediately after the GoReleaser
step in the job flow so tag creation only occurs when the build step
(GoReleaser) has succeeded and before uploading artifacts or marking the release
as complete.
Summary by CodeRabbit