From 714adfa865a9de7bfea19eb0b79938910d11ca18 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Mon, 15 Jul 2024 08:37:42 -0400 Subject: [PATCH] Add goreleaser (#9) --- .github/workflows/goreleaser.yml | 13 +++++++----- .goreleaser.yml | 34 ++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 .goreleaser.yml diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 7c148f4..c89a2ce 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -18,11 +18,13 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - - name: Set up Go - uses: actions/setup-go@v3 - - - name: Run GoReleaser + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '>=1.22.2' + + - name: Run GoReleaser uses: goreleaser/goreleaser-action@v4 with: distribution: goreleaser @@ -30,3 +32,4 @@ jobs: args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..71e2c29 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,34 @@ +before: + hooks: + - go mod tidy +builds: + - binary: go-islandora + env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + +archives: + - format: tar.gz + name_template: >- + {{ .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} + format_overrides: + - goos: windows + format: zip +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ incpatch .Version }}-next" +changelog: + sort: asc + filters: + exclude: + - '^fixtures:' + - '^tests:'