ci: add goreleaser config and release workflow#50
Conversation
Wires goreleaser v2 to produce multi-arch binaries (linux, darwin, windows for amd64 and arm64) with sha256 checksums on tag push. Asset naming `a6_<version>_<os>_<arch>.<ext>` matches the format expected by the `a6 update` command's FindAsset. Refs #37
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a GitHub Actions ChangesRelease Automation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/release.yml:
- Around line 16-24: The workflow uses floating action tags and leaves checkout
credentials persisted, increasing risk; update the release workflow to pin
actions to specific SHAs or full version tags and disable credential persistence
when calling actions/checkout (set persist-credentials: false) and reduce
repository permissions by setting permissions.contents to read (or none) instead
of write; locate the uses of actions/checkout@v4, actions/setup-go@v5, and
goreleaser/goreleaser-action@v6 in the file and replace them with pinned
references and add persist-credentials: false under actions/checkout, and adjust
the top-level permissions block to remove or lower contents write access.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1fce8335-e02c-4457-9bcf-c628accb0d48
📒 Files selected for processing (2)
.github/workflows/release.yml.goreleaser.yml
Pin actions/checkout, actions/setup-go, and goreleaser/goreleaser-action to the commit SHAs for their v4/v5/v6 tags, and set persist-credentials: false on checkout. Keeps the top-level contents: write permission since goreleaser needs it to publish the GitHub Release. Addresses CodeRabbit review on #50.
|
Thanks for the review. Pushed 74c8388:
Kept the top-level |
Summary
.goreleaser.ymlfrom a7 (project namea6, modulegithub.com/api7/a6); upgrade to goreleaser v2 syntax (version: 2,formats: [...])..github/workflows/release.ymlthat runs goreleaser on tag push (v*), producing tar.gz/zip archives for linux/darwin/windows on amd64/arm64 plus achecksums.txt.a6_<version>_<os>_<arch>.<ext>matches whatinternal/update.FindAssetlooks for, soa6 updatewill discover assets from this workflow once a tag is published.Locally validated with
goreleaser checkandgoreleaser release --snapshot --clean; verified the produced binary reports the linker-injected version.Closes part of #37 (config + workflow). Tagging
v0.1.0-rc1and the end-to-enda6 updateverification will be done after this PR merges, so the workflow fires frommain.Refs #33, #37
Test plan
v0.1.0-rc1and confirm the Release workflow uploads 6 archives +checksums.txtdevbuild ofa6 updateagainst the published release and confirm it finds the asset, downloads, and self-replacesSummary by CodeRabbit