From 60fbd426a2c494c4d72c9a986c8aef915215590c Mon Sep 17 00:00:00 2001 From: Cesar Gimenes Date: Fri, 19 Nov 2021 02:18:10 -0300 Subject: [PATCH] add goreleaser --- .github/workflows/release.yml | 31 +++++++++++++++++++++++ .goreleaser.yml | 46 +++++++++++++++++++++++++++++++++++ 2 files changed, 77 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..71c0103 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,31 @@ +name: goreleaser + +on: + pull_request: + push: + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + - + name: Unshallow + run: git fetch --prune --unshallow + - + name: Set up Go + uses: actions/setup-go@v1 + with: + go-version: 1.17.x + - + name: Run GoReleaser + uses: goreleaser/goreleaser-action@v1 + with: + version: latest + args: release --rm-dist + key: ${{ secrets.YOUR_PRIVATE_KEY }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..449cda5 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,46 @@ +before: + hooks: + - go mod download +builds: + - + env: + - CGO_ENABLED=0 + + goos: + - darwin + - linux + - windows + + goarch: + - amd64 + - arm + - arm64 + + goarm: + - 6 + - 7 + + ignore: + - goos: darwin + goarch: 386 + - goos: linux + goarch: arm + goarm: 7 + +archives: + - replacements: + darwin: Darwin + linux: Linux + windows: Windows + 386: i386 + amd64: x86_64 +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ .Tag }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' \ No newline at end of file