From 4e135748b955756bada1d6a4885984989b8da90f Mon Sep 17 00:00:00 2001 From: nixpig <143995476+nixpig@users.noreply.github.com> Date: Fri, 27 Dec 2024 05:50:56 +0000 Subject: [PATCH] chore: add goreleaser --- .github/workflows/release.yml | 29 +++++++++++++++++++++++++++++ .goreleaser.yml | 28 ++++++++++++++++++++++++++++ 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..956e04d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +name: release + +on: + push: + tags: + - ** + + workflow_dispatch: + inputs: + version: + description: "Release version" + required: true + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup + uses: actions/setup-go@v5 + with: + go-version: "1.22.5" + + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + run: go run github.com/goreleaser/goreleaser/v2@latest release diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..4823a8d --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,28 @@ +# yaml-language-server: $schema=https://goreleaser.com/static/schema.json +# vim: set ts=2 sw=2 tw=0 fo=cnqoj + +version: 2 + +builds: + - id: brownie + main: ./... + binary: brownie + env: + - CGO_ENABLED=1 + targets: + - linux_amd64 + - linux_arm64 + +archives: + - id: brownie + format: tar.gz + name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" + builds: + - brownie + +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:"