From 020364065986549c394004ed0435391d85749ef2 Mon Sep 17 00:00:00 2001 From: Nick Klauer Date: Tue, 14 Jul 2020 07:29:47 -0500 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=94=96=20add=20goreleaser?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .goreleaser.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .goreleaser.yml diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..ae0df00 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,26 @@ +# This is an example goreleaser.yaml file with some sane defaults. +# Make sure to check the documentation at http://goreleaser.com +before: + hooks: + # You may remove this if you don't use go modules. + - go mod download +builds: +- env: + - CGO_ENABLED=0 +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:' From c466c5efc63f1a3da9a97a9cb3658aacf241ca42 Mon Sep 17 00:00:00 2001 From: Nick Klauer Date: Tue, 14 Jul 2020 07:33:18 -0500 Subject: [PATCH 2/3] fix: add trimpath to gc --- .goreleaser.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.goreleaser.yml b/.goreleaser.yml index ae0df00..916858f 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -7,6 +7,8 @@ before: builds: - env: - CGO_ENABLED=0 + gcflags: + - all=-trimpath={{.Env.GOPATH}} archives: - replacements: darwin: Darwin From 94028b57f7457f47d0ab5c5baf9cdbc46734911f Mon Sep 17 00:00:00 2001 From: Nick Klauer Date: Tue, 14 Jul 2020 07:40:23 -0500 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=91=B7=20add=20GoReleaser=20GitHub=20?= =?UTF-8?q?Action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/goreleaser.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/goreleaser.yml diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml new file mode 100644 index 0000000..d23e83d --- /dev/null +++ b/.github/workflows/goreleaser.yml @@ -0,0 +1,26 @@ +name: goreleaser + +on: + push: + tags: + - '*' + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set Up Go + uses: actions/setup-go@v2 + with: + go-version: 1.14 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}