From ba71ad48f007d4f383dd17b81b86772495deaeee Mon Sep 17 00:00:00 2001 From: chebread <83535893+chebread@users.noreply.github.com> Date: Fri, 27 Mar 2026 13:37:24 +0900 Subject: [PATCH 1/4] Setup release automation with GoReleaser and GitHub Actions --- .github/workflows/release.yml | 27 +++++++++++++++++++++++++++ .gitignore | 1 + .goreleaser.yml | 27 +++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 .goreleaser.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e1c83e1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +name: Release + +on: + push: + tags: + - "v*" + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/setup-go@v5 + with: + go-version: "1.25.x" + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + version: "~> v2" + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 452f658..56258d3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ tmp ./devd ./devd.exe .DS_Store +dist/ diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..4685c43 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,27 @@ +version: 2 + +project_name: devd + +builds: + - id: devd-build + main: ./cmd/devd + binary: devd + env: + - CGO_ENABLED=0 + targets: + - darwin_amd64 + - darwin_arm64 + - windows_amd64 + - windows_386 + - linux_amd64 + - linux_arm + - netbsd_amd64 + - netbsd_arm + - openbsd_amd64 + - freebsd_amd64 + +archives: + - name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" + +checksum: + name_template: "checksums.txt" From 752b811ebf56b2926369b427f11a669b96962d4f Mon Sep 17 00:00:00 2001 From: chebread <83535893+chebread@users.noreply.github.com> Date: Fri, 27 Mar 2026 13:53:09 +0900 Subject: [PATCH 2/4] Move GoReleaser config to .config directory --- .goreleaser.yml => .config/.goreleaser.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .goreleaser.yml => .config/.goreleaser.yml (100%) diff --git a/.goreleaser.yml b/.config/.goreleaser.yml similarity index 100% rename from .goreleaser.yml rename to .config/.goreleaser.yml From a137dba0fb02b3911c50dfaf7eacba6651f07498 Mon Sep 17 00:00:00 2001 From: chebread <83535893+chebread@users.noreply.github.com> Date: Fri, 27 Mar 2026 14:02:43 +0900 Subject: [PATCH 3/4] Update README badges and development section --- README.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3dbbf5e..37d4b99 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,4 @@ - -[![Travis Build Status](https://travis-ci.org/cortesi/devd.svg?branch=master)](https://travis-ci.org/cortesi/devd) - - +[![CI](https://github.com/cortesi/devd/actions/workflows/ci.yml/badge.svg)](https://github.com/cortesi/devd/actions/workflows/ci.yml) # devd: a local webserver for developers @@ -309,6 +306,5 @@ correctly. # Development -The scripts used to build this package for distribution can be found -[here](https://github.com/cortesi/godist). External packages are vendored using -[dep](https://github.com/golang/dep). +This project uses standard Go modules for dependency management. +Automated builds and releases are handled via GitHub Actions and [GoReleaser](https://goreleaser.com/). From f39fd650cdb66688c365f22343192c0625b63be4 Mon Sep 17 00:00:00 2001 From: chebread <83535893+chebread@users.noreply.github.com> Date: Sun, 29 Mar 2026 15:31:24 +0900 Subject: [PATCH 4/4] Add trimpath, strip flags, and static linux tags --- .config/.goreleaser.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.config/.goreleaser.yml b/.config/.goreleaser.yml index 4685c43..5792163 100644 --- a/.config/.goreleaser.yml +++ b/.config/.goreleaser.yml @@ -8,6 +8,10 @@ builds: binary: devd env: - CGO_ENABLED=0 + flags: + - -trimpath + ldflags: + - -s -w targets: - darwin_amd64 - darwin_arm64 @@ -19,6 +23,13 @@ builds: - netbsd_arm - openbsd_amd64 - freebsd_amd64 + overrides: + - goos: linux + flags: + - -trimpath + - -tags=osusergo,netgo + ldflags: + - -s -w archives: - name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"