Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 11, 2025

The .goreleaser.yaml had an incomplete release: section and missing build configuration, relying on implicit defaults.

Changes

  • Build configuration: Added explicit id, main, binary fields and ldflags for stripping (-s -w) and version embedding
  • Release section: Added GitHub config, release mode, and installation instructions as header/footer templates
  • Code formatting: Simplified struct literal in main.go

Before

builds:
  - env:
      - CGO_ENABLED=0
    goos:
      - linux
    goarch:
      - amd64
      - arm64

release:

After

builds:
  - id: adapt
    main: ./main.go
    binary: adapt
    env:
      - CGO_ENABLED=0
    goos:
      - linux
    goarch:
      - amd64
      - arm64
    ldflags:
      - -s -w
      - -X main.version={{.Version}}
      - -X main.commit={{.Commit}}
      - -X main.date={{.Date}}

release:
  github:
    owner: ericsuh
    name: adapt
  draft: false
  prerelease: auto
  mode: replace
  header: |
    ## Release {{.Version}}
    Download the appropriate archive for your system below.
  footer: |
    ## Installation
    1. Download the archive for your system
    2. Extract: `tar -xzf adapt_{{.Version}}_linux_*.tar.gz`
    3. Move to PATH: `sudo mv adapt /usr/local/bin/`
    4. Make executable: `sudo chmod +x /usr/local/bin/adapt`

This produces smaller binaries with embedded version metadata and user-friendly release notes.

Original prompt

Diagnose and fix the go build and release pipeline GitHub Actions workflow, which is currently not producing working binary executables in the releases pages.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Nov 11, 2025
Copilot AI and others added 2 commits November 11, 2025 06:52
…ease section

Co-authored-by: ericsuh <382805+ericsuh@users.noreply.github.com>
Co-authored-by: ericsuh <382805+ericsuh@users.noreply.github.com>
Copilot AI changed the title [WIP] Diagnose and fix GitHub Actions workflow for go build Complete GoReleaser configuration with build metadata and release documentation Nov 11, 2025
Copilot AI requested a review from ericsuh November 11, 2025 06:59
@ericsuh ericsuh marked this pull request as ready for review November 12, 2025 05:28
@ericsuh ericsuh merged commit 5034db7 into main Nov 13, 2025
2 checks passed
@ericsuh ericsuh deleted the copilot/fix-github-actions-pipeline branch November 13, 2025 04:27
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