Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .config/.goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
version: 2

project_name: devd

builds:
- id: devd-build
main: ./cmd/devd
binary: devd
env:
- CGO_ENABLED=0
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we want -trimpath also? as in understand default config debug and symbols are stripped by default? (-s -w)

Also maybe -tags osusergo,netgo for linux? not sure devd will end up using any libc but if so it might be good to binaries work on non-glibc linux (like alpine). Fully static at least for linux would be nice, there is some discussion in golang/go#26492 what is needed

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"
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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 }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ tmp
./devd
./devd.exe
.DS_Store
dist/
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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/).
Loading