diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..2128dac --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,33 @@ +name: goreleaser + +on: + push: + branches: + - 'main' + tags: + - 'v*' + +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.16 + - + name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + # either 'goreleaser' (default) or 'goreleaser-pro' + distribution: goreleaser + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..9fb563e --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,31 @@ +# For more info about this file, check the documentation at http://goreleaser.com +before: + hooks: + - go mod download +builds: + - ldflags: + - -X "github.com/nirdosh17/cfn-teardown/cmd.Version={{ .Tag }}" + env: + - CGO_ENABLED=0 + binary: cfn-teardown + goos: + - linux + - windows + - darwin +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:'