From 8fc5a38525e071904d30a76c24397b15c4763641 Mon Sep 17 00:00:00 2001 From: Matthew Greenwald Date: Fri, 8 May 2026 13:55:42 -0400 Subject: [PATCH] ci: adding go-releaser for pre-compiled binaries Signed-off-by: Matthew Greenwald --- .github/workflows/release.yml | 28 ++++++++++++++++++++++++++++ .goreleaser.yaml | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 .goreleaser.yaml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..da53180f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: Release Pipeline +on: + push: + tags: + - 'v*.*.*' + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + name: release + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/setup-go@v5 + with: + go-version: '^1.23' + + - uses: goreleaser/goreleaser-action@v6 + with: + version: '~> v2' + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 00000000..27d5c2bd --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,34 @@ +version: 2 + +builds: + - main: ./cmd/tcld + env: + - CGO_ENABLED=0 + goos: + - linux + - darwin + - windows + goarch: + - amd64 + - arm64 + ignore: + - goos: windows + goarch: arm64 + ldflags: + - -w + - -X github.com/temporalio/tcld/app.date={{.Date}} + - -X github.com/temporalio/tcld/app.commit={{.ShortCommit}} + - -X github.com/temporalio/tcld/app.version={{.Tag}} + +archives: + - formats: + - tar.gz + format_overrides: + - goos: windows + formats: + - zip + name_template: "tcld_{{ .Os }}_{{ .Arch }}" + +checksum: + name_template: sha256sums.txt + algorithm: sha256