Conversation
📝 Walkthrough## Walkthrough
The GoReleaser configuration was updated to conditionally set build targets for operating systems and architectures based on specific environment variables. The selection logic uses Go templating to restrict or expand the target list, while the rest of the build configuration remains unchanged. Additionally, a new `release` job was added to the GitHub Actions workflow, triggered on push events and using a reusable workflow.
## Changes
| File(s) | Change Summary |
|----------------------------|-------------------------------------------------------------------------------------------------------------------------|
| .goreleaser.yml | Added conditional logic using Go templating to set OS and architecture targets based on environment variables. |
| .github/workflows/test.yml | Added a new `release` job that depends on multiple prior jobs and uses a reusable workflow, triggered on push events. |
## Possibly related PRs
- cloudposse/atmos#721: Adds or modifies the `release` job in the GitHub Actions workflow, focusing on release process automation.
- cloudposse/atmos#1350: Moves the `release` job to a separate workflow, modifying the same release job but with different structuring.
- cloudposse/atmos#1281: Adjusts the release job triggers and parameters, related to the same GitHub Actions release job.
## Suggested labels
`minor`
## Suggested reviewers
- aknysh✨ Finishing Touches🧪 Generate Unit Tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.goreleaser.yml(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.goreleaser.yml
[error] 15-15: syntax error: could not find expected ':'
(syntax)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Lint (golangci)
- GitHub Check: Analyze (go)
- GitHub Check: Summary
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.goreleaser.yml(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.goreleaser.yml
[error] 15-15: syntax error: could not find expected ':'
(syntax)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Analyze (go)
- GitHub Check: Lint (golangci)
- GitHub Check: Summary
🔇 Additional comments (2)
.goreleaser.yml (2)
13-22: (FYI) YAML-lint error is a false positiveThe linter flags a syntax error at line 15 because it can’t parse the Go template directives.
GoReleaser tolerates these blocks just fine, so no action is needed here.Also applies to: 23-32
14-17: Good catch on.Envmap accessSwitching to
index .Env "GO_RELEASER_TARGET_COMMITISH"fixes the dead-code path pointed out in the previous review.
Nice cleanup!Also applies to: 24-27
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1353 +/- ##
==========================================
+ Coverage 51.33% 51.38% +0.04%
==========================================
Files 243 243
Lines 26230 26230
==========================================
+ Hits 13464 13477 +13
+ Misses 11101 11083 -18
- Partials 1665 1670 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Important Cloud Posse Engineering Team Review RequiredThis pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes. To expedite this process, reach out to us on Slack in the |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/test.yml (1)
531-531: Guard condition may still trigger on tag pushes.
github.event_name == 'push'fires for both branch and tag pushes that meet the workflow-level branch filter.
If the release job should only run for branch pushes (e.g.main,release/v*), add an explicit ref-type check:- if: github.event_name == 'push' + if: github.event_name == 'push' && github.ref_type == 'branch'Double-check that this matches the intended release cadence.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/test.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (7)
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Analyze (go)
- GitHub Check: Lint (golangci)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Analyze (go)
- GitHub Check: Lint (golangci)
- GitHub Check: Summary
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.goreleaser.yml (1)
24-32: DRY up the duplicated template logic
The identicalifexpression appears in bothgoosandgoarch. Hoist it into a helper variable to avoid drift and improve readability:- goarch: -{{ if and (eq (index .Env "GO_RELEASER_DRAFT_MODE") "true") (eq (index .Env "GO_RELEASER_TARGET_COMMITISH") "true") }} + {{- $draft := and (eq (index .Env "GO_RELEASER_DRAFT_MODE") "true") (eq (index .Env "GO_RELEASER_TARGET_COMMITISH") "true") -}} + goarch: +{{ if $draft }}Repeat the same
$draftcheck for thegooslist above. Keeps future edits to the condition in one place.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.goreleaser.yml(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.goreleaser.yml
[error] 15-15: syntax error: could not find expected ':'
(syntax)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: Lint (golangci)
- GitHub Check: Analyze (go)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Summary
🔇 Additional comments (2)
.goreleaser.yml (2)
14-17: Condition now reads the env map correctly – well done
Switching toindex+eqfixes the dead-code path flagged earlier and makes the intent explicit.
14-32: Re-confirm the “true” string convention
The logic now requires both env vars to be exactly the string"true". If CI sets them to"1"or any other non-empty value, the restricted target list will be skipped. Double-check that pipeline/export scripts indeed export"true"(not just set/unset).
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.goreleaser.yml(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.goreleaser.yml
[error] 15-15: syntax error: could not find expected ':'
(syntax)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Summary
what
why
Summary by CodeRabbit