From 6267bc6087e664847c41a8d5ac7e0ccd85c1446c Mon Sep 17 00:00:00 2001 From: Hadi Date: Mon, 4 May 2026 13:14:50 +0200 Subject: [PATCH] Add goreleaser Signed-off-by: Hadi --- .github/workflows/release.yml | 28 ++++++++++++++++++++++++++++ .goreleaser.yaml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 59 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 0000000..8cf8fc1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: Release + +on: + push: + tags: + - "v*" + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + + - 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 0000000..2121d10 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,31 @@ +version: 2 + +before: + hooks: + - go mod tidy + +builds: + - binary: usbguard-tui + goos: + - linux + goarch: + - amd64 + - arm64 + ldflags: + - -s -w -X main.version={{.Version}} + +archives: + - formats: + - tar.gz + name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}" + +checksum: + name_template: checksums.txt + +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:" + - "^ci:"