diff --git a/.config/.goreleaser.yml b/.config/.goreleaser.yml new file mode 100644 index 0000000..5792163 --- /dev/null +++ b/.config/.goreleaser.yml @@ -0,0 +1,38 @@ +version: 2 + +project_name: devd + +builds: + - id: devd-build + main: ./cmd/devd + binary: devd + env: + - CGO_ENABLED=0 + flags: + - -trimpath + ldflags: + - -s -w + targets: + - darwin_amd64 + - darwin_arm64 + - windows_amd64 + - windows_386 + - linux_amd64 + - linux_arm + - netbsd_amd64 + - netbsd_arm + - openbsd_amd64 + - freebsd_amd64 + overrides: + - goos: linux + flags: + - -trimpath + - -tags=osusergo,netgo + ldflags: + - -s -w + +archives: + - name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" + +checksum: + name_template: "checksums.txt" 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/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/).