From addf36d04dd3468d7f39cf27bbe060785f3dece5 Mon Sep 17 00:00:00 2001 From: James Cleverley-Prance Date: Sun, 2 Apr 2023 22:52:53 +0100 Subject: [PATCH] ci: add --- .github/workflows/goreleaser.yml | 35 ++++++++++++++++++++++++++++++++ .goreleaser.yaml | 30 +++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 .github/workflows/goreleaser.yml create mode 100644 .goreleaser.yaml diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml new file mode 100644 index 0000000..947c5b9 --- /dev/null +++ b/.github/workflows/goreleaser.yml @@ -0,0 +1,35 @@ +name: goreleaser + +on: + push: + tags: + - '*' + +permissions: + contents: write + # packages: write + # issues: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Fetch all tags + run: git fetch --force --tags + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.19 + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v4 + with: + distribution: goreleaser + version: latest + args: release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..9ead83f --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,30 @@ +project_name: coredns-enum +before: + hooks: + - go mod tidy +builds: + - id: coredns-enum + env: + - CGO_ENABLED=0 + goos: + - linux + - darwin + - windows + goarch: + - amd64 + - arm + - arm64 + goarm: + - 6 +archives: + - builds: + - coredns-enum + name_template: "{{ .ProjectName }}_{{ .Tag }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" + wrap_in_directory: false +checksum: + name_template: 'checksums.txt' + algorithm: sha256 +snapshot: + name_template: "{{ incpatch .Version }}-next" +changelog: + sort: asc