Skip to content

ci: update the release process (WIP)#29

Closed
Darth-Weider wants to merge 3 commits into
mainfrom
ci/update-release-process
Closed

ci: update the release process (WIP)#29
Darth-Weider wants to merge 3 commits into
mainfrom
ci/update-release-process

Conversation

@Darth-Weider

Copy link
Copy Markdown
Collaborator

Summary

  • Add Release Please GitHub Action to automate versioning, changelog, and GitHub Releases
  • Build cross-platform Go binaries (darwin/linux/windows, amd64/arm64) on release and upload as release assets
  • Add PR check workflow with go test and golangci-lint on pull requests to main

Add Release Please GitHub Action with automated Go binary builds.
On release, builds cross-platform binaries (darwin/linux/windows,
amd64/arm64) and uploads them as release assets.
Run go test and golangci-lint on pull requests to main.
Copilot AI review requested due to automatic review settings April 15, 2026 22:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds GitHub Actions workflows and Release Please configuration to automate releases (versioning/changelog/GitHub Releases), build cross-platform Go binaries, and run PR checks on main.

Changes:

  • Introduce Release Please config + manifest for automated tagging and releases.
  • Add release workflow to build/upload multi-OS/arch Go binaries as GitHub Release assets.
  • Add PR workflow to run go test, gofmt checks, and golangci-lint.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.

File Description
release-please-config.json Configures Release Please release strategy/tag format.
.release-please-manifest.json Sets initial manifest version for Release Please tracking.
.github/workflows/release.yaml Automates release creation and builds/uploads binaries as release assets.
.github/workflows/pr-check.yaml Adds CI checks for tests, formatting, and linting on PRs to main.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release.yaml
Comment thread .github/workflows/release.yaml
Comment thread .github/workflows/release.yaml
Comment thread .github/workflows/release.yaml
Comment thread .github/workflows/release.yaml
Comment thread .github/workflows/release.yaml Outdated
Comment thread .github/workflows/pr-check.yaml
Comment thread .github/workflows/release.yaml Outdated
- Compare release_created explicitly against 'true' string
- Create bin/ directory before build
- Zip Windows .exe binaries to avoid security download blocks
- Inject version via ldflags so binaries report correct version
- Add --clobber to gh release upload for idempotent re-runs
@Darth-Weider Darth-Weider changed the title ci: update the release process ci: update the release process (WIP) Apr 15, 2026
@Darth-Weider Darth-Weider requested a review from Copilot April 15, 2026 22:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +50 to +56
-ldflags "-X github.com/pbs/redyl/internal/redyl/version.Version=${{ needs.release-please.outputs.version }}" \
-o "bin/${binary_name}.exe" .
zip -j "bin/${binary_name}.zip" "bin/${binary_name}.exe"
rm "bin/${binary_name}.exe"
else
go build \
-ldflags "-X github.com/pbs/redyl/internal/redyl/version.Version=${{ needs.release-please.outputs.version }}" \

Copilot AI Apr 15, 2026

Copy link

Choose a reason for hiding this comment

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

go build -ldflags "-X ...version.Version=..." will fail with the current code because internal/redyl/version.Version is declared as a const (linker -X can only set string variables). Change the version symbol to a var (e.g., defaulting to "dev") or remove the -X injection and update versioning another way.

Suggested change
-ldflags "-X github.com/pbs/redyl/internal/redyl/version.Version=${{ needs.release-please.outputs.version }}" \
-o "bin/${binary_name}.exe" .
zip -j "bin/${binary_name}.zip" "bin/${binary_name}.exe"
rm "bin/${binary_name}.exe"
else
go build \
-ldflags "-X github.com/pbs/redyl/internal/redyl/version.Version=${{ needs.release-please.outputs.version }}" \
-o "bin/${binary_name}.exe" .
zip -j "bin/${binary_name}.zip" "bin/${binary_name}.exe"
rm "bin/${binary_name}.exe"
else
go build \

Copilot uses AI. Check for mistakes.
Comment on lines +50 to +56
-ldflags "-X github.com/pbs/redyl/internal/redyl/version.Version=${{ needs.release-please.outputs.version }}" \
-o "bin/${binary_name}.exe" .
zip -j "bin/${binary_name}.zip" "bin/${binary_name}.exe"
rm "bin/${binary_name}.exe"
else
go build \
-ldflags "-X github.com/pbs/redyl/internal/redyl/version.Version=${{ needs.release-please.outputs.version }}" \

Copilot AI Apr 15, 2026

Copy link

Choose a reason for hiding this comment

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

Same issue as the Windows branch: linker -X cannot set a const. With internal/redyl/version.Version currently a constant, this build command will fail; switch it to a var or stop using -X to set it.

Suggested change
-ldflags "-X github.com/pbs/redyl/internal/redyl/version.Version=${{ needs.release-please.outputs.version }}" \
-o "bin/${binary_name}.exe" .
zip -j "bin/${binary_name}.zip" "bin/${binary_name}.exe"
rm "bin/${binary_name}.exe"
else
go build \
-ldflags "-X github.com/pbs/redyl/internal/redyl/version.Version=${{ needs.release-please.outputs.version }}" \
-o "bin/${binary_name}.exe" .
zip -j "bin/${binary_name}.zip" "bin/${binary_name}.exe"
rm "bin/${binary_name}.exe"
else
go build \

Copilot uses AI. Check for mistakes.
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: simple

Copilot AI Apr 15, 2026

Copy link

Choose a reason for hiding this comment

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

This workflow appears to be using Release Please "manifest" mode (new release-please-config.json + .release-please-manifest.json). In that mode, passing release-type: simple here is redundant and can be confusing (and may override/ignore package config depending on action behavior). Consider removing release-type and explicitly setting config-file/manifest-file, or drop the config/manifest files and use single-package inputs only.

Suggested change
release-type: simple
config-file: release-please-config.json
manifest-file: .release-please-manifest.json

Copilot uses AI. Check for mistakes.
Comment on lines +6 to +9
permissions:
contents: write
pull-requests: write

Copilot AI Apr 15, 2026

Copy link

Choose a reason for hiding this comment

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

Workflow-level permissions grant pull-requests: write to all jobs, including build/upload steps that don't need it. To follow least-privilege, consider moving pull-requests: write to just the release-please job and scoping other jobs to contents: read (build) and contents: write (asset upload) as needed.

Copilot uses AI. Check for mistakes.
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