From 641a0e2e802db6c66e838c2dc793972a2b4ccaa9 Mon Sep 17 00:00:00 2001 From: na4ma4 Date: Tue, 9 Jan 2024 14:15:02 +1000 Subject: [PATCH] add goreleaser back in for release publishing --- .github/workflows/ci.yml | 8 ++++++ .goreleaser.yml | 56 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 .goreleaser.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f5c2093..19acdde 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,3 +13,11 @@ jobs: name: "Unit Test" uses: na4ma4/actions/.github/workflows/unit-test.yml@main + goreleaser: + name: "Goreleaser" + if: startsWith(github.ref, 'refs/tags/v') + needs: + - unit-test + uses: na4ma4/actions/.github/workflows/goreleaser.yml@main + secrets: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..56b4251 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,56 @@ +env: + - CGO_ENABLED=0 + +before: + hooks: + - make test + - go generate ./... + - go mod tidy + - go mod download + +builds: + - id: traefik-acme + main: ./cmd/traefik-acme + binary: traefik-acme + flags: + - -tags=release + - -buildmode=default + - -trimpath + - -v + mod_timestamp: '{{ .CommitTimestamp }}' + goarm: [ '5', '6', '7' ] + goos: ['linux', 'darwin', 'windows'] + goarch: ['amd64', 'arm', 'arm64'] + ignore: + - goos: windows + goarch: arm + - goos: windows + goarch: arm64 + +checksum: + algorithm: sha256 + name_template: 'checksums.txt' + +snapshot: + name_template: "{{ .Tag }}-next" + +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' + +nfpms: + - + id: traefik-acme-nfpms + package_name: traefik-acme + builds: + - traefik-acme + homepage: https://github.com/na4ma4/traefik-acme + maintainer: na4ma4 + description: Traefik ACME extraction tool. + formats: + - apk + - deb + bindir: /usr/bin