From 13db99f33e002e9643b6258b686dae41865b6d26 Mon Sep 17 00:00:00 2001 From: epot Date: Wed, 7 Jan 2026 11:49:25 +0100 Subject: [PATCH] Add go releaser --- .github/workflows/release.yml | 30 ++++++++++++++++++++++++++++++ .goreleaser.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 57 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..ba1f96a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release + +on: + push: + tags: + - "*" + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + fetch-depth: 0 + - name: Go Setup + uses: actions/setup-go@v6 + with: + go-version: 1.25 + - name: Run Release + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + version: '~> v2' + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..35054f6 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,27 @@ +before: + hooks: + - go mod download +builds: +- + main: ./main.go + binary: gobuildcache + ldflags: + - -s -w + goos: + - linux + - darwin + goarch: + - amd64 + - arm + - arm64 + goarm: + - 5 + - 6 + - 7 +archives: +- + id: gobuildcache + replacements: + darwin: Darwin + linux: Linux + amd64: x86_64