diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..2eaaebdceb --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +name: Release + +on: + push: + tags: + - "v*" + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6.0.2 + with: + fetch-depth: 0 + + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + version: "~> v2" + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000000..f5b6b713a6 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,36 @@ +version: 2 + +builds: + - main: ./cmd/fullsend/ + binary: fullsend + ldflags: + - -s -w -X github.com/fullsend-ai/fullsend/internal/cli.version={{.Version}} + env: + - CGO_ENABLED=0 + goos: + - linux + - darwin + goarch: + - amd64 + - arm64 + +archives: + - format: tar.gz + name_template: >- + {{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }} + +checksum: + name_template: checksums.txt + +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:" + - "^chore:" + +release: + github: + owner: fullsend-ai + name: fullsend diff --git a/Makefile b/Makefile index 8520af9946..c1a7f73b5a 100644 --- a/Makefile +++ b/Makefile @@ -71,7 +71,7 @@ lint-adr-frontmatter: VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev") go-build: - go build -ldflags "-X main.version=$(VERSION)" -o bin/fullsend ./cmd/fullsend/ + go build -ldflags "-X github.com/fullsend-ai/fullsend/internal/cli.version=$(VERSION)" -o bin/fullsend ./cmd/fullsend/ go-test: go test -race -cover ./...