-
Notifications
You must be signed in to change notification settings - Fork 6
feat: add Windows builds to publish pipeline #1070
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughThis change updates .github/workflows/publish.yml to add Windows runners (windows-latest) for amd64 and arm64 to the build matrix; extend Go build cache path resolution to handle Windows via AppData; append Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/publish.yml(4 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/publish.yml
[error] 119-119: syntax error: expected , but found ''
(syntax)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
- GitHub Check: cubic · AI code reviewer
- GitHub Check: go-test (1.25.x, windows-latest)
- GitHub Check: go-test (1.24.x, ubuntu-latest)
- GitHub Check: go-test (1.24.x, macos-latest)
- GitHub Check: go-test (1.25.x, macos-latest)
- GitHub Check: go-test (1.24.x, windows-latest)
- GitHub Check: nilaway
- GitHub Check: lint
- GitHub Check: Analyze (go)
🔇 Additional comments (1)
.github/workflows/publish.yml (1)
95-95: I'll help you verify the Windows cache path escaping in the GitHub Actions workflow. Let me search for information about how GitHub Actions handles backslash escaping in YAML expressions.
<function_calls>
GitHub Actions Windows path backslash escaping YAML expressions
</function_calls>I'll also examine the workflow file to understand the context better:
<function_calls>
#!/bin/bashCheck the workflow file around line 95
cat -n .github/workflows/publish.yml | sed -n '85,105p'
</function_calls>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 issues found across 1 file
Prompt for AI agents (all 2 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name=".github/workflows/publish.yml">
<violation number="1" location=".github/workflows/publish.yml:105">
These new POSIX shell lines run under PowerShell on windows-latest (the default shell for Windows runners), so the Windows jobs will fail before archiving any artifact unless you explicitly run the step under bash or rewrite it for PowerShell.</violation>
<violation number="2" location=".github/workflows/publish.yml:119">
The `subject-path` value is wrapped in single quotes even though the contained expression uses single-quoted literals. YAML treats the inner quotes as the end of the scalar, so the workflow cannot be parsed. Use double quotes (or escape the inner quotes) around the expression.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
.github/workflows/publish.yml
Outdated
| uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0 https://github.com/actions/attest-build-provenance/releases/tag/v3.0.0 | ||
| with: | ||
| subject-path: '${{ env.APPLICATION_NAME }}' | ||
| subject-path: '${{ matrix.os == 'windows' && format('{0}.exe', env.APPLICATION_NAME) || env.APPLICATION_NAME }}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The subject-path value is wrapped in single quotes even though the contained expression uses single-quoted literals. YAML treats the inner quotes as the end of the scalar, so the workflow cannot be parsed. Use double quotes (or escape the inner quotes) around the expression.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/publish.yml, line 119:
<comment>The `subject-path` value is wrapped in single quotes even though the contained expression uses single-quoted literals. YAML treats the inner quotes as the end of the scalar, so the workflow cannot be parsed. Use double quotes (or escape the inner quotes) around the expression.</comment>
<file context>
@@ -106,7 +116,7 @@ jobs:
uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0 https://github.com/actions/attest-build-provenance/releases/tag/v3.0.0
with:
- subject-path: '${{ env.APPLICATION_NAME }}'
+ subject-path: '${{ matrix.os == 'windows' && format('{0}.exe', env.APPLICATION_NAME) || env.APPLICATION_NAME }}'
build-images:
</file context>
| subject-path: '${{ matrix.os == 'windows' && format('{0}.exe', env.APPLICATION_NAME) || env.APPLICATION_NAME }}' | |
| subject-path: "${{ matrix.os == 'windows' && format('{0}.exe', env.APPLICATION_NAME) || env.APPLICATION_NAME }}" |
| if: startsWith(github.ref, 'refs/tags/') | ||
| run: | | ||
| _binary_name=${{ env.APPLICATION_NAME }} | ||
| if [ "${{ matrix.os }}" = "windows" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These new POSIX shell lines run under PowerShell on windows-latest (the default shell for Windows runners), so the Windows jobs will fail before archiving any artifact unless you explicitly run the step under bash or rewrite it for PowerShell.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/publish.yml, line 105:
<comment>These new POSIX shell lines run under PowerShell on windows-latest (the default shell for Windows runners), so the Windows jobs will fail before archiving any artifact unless you explicitly run the step under bash or rewrite it for PowerShell.</comment>
<file context>
@@ -95,8 +101,12 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
run: |
+ _binary_name=${{ env.APPLICATION_NAME }}
+ if [ "${{ matrix.os }}" = "windows" ]; then
+ _binary_name="${{ env.APPLICATION_NAME }}.exe"
+ fi
</file context>
0b9211f to
0c4ddb3
Compare
- Include windows-amd64 and windows-arm64 in build matrix - Handle .exe extension for Windows binaries in upload and attestation - Update cache path for Windows runners Signed-off-by: Chris Gianelloni <[email protected]>
f9fa7c5 to
3e7c1a7
Compare
Summary by cubic
Add Windows (amd64, arm64) to the publish pipeline and make release packaging and attestation Windows-aware.
Written for commit 3e7c1a7. Summary will update automatically on new commits.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.