diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5acb4d4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +name: release + +on: + push: + tags: + - 'v*' + +jobs: + release: + 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 }} + HOMEBREW_TAP_RELEASE_TOKEN: ${{ secrets.HOMEBREW_TAP_RELEASE_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..03ac555 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,41 @@ +before: + hooks: + - go mod download + +builds: + - main: ./cmd/codeowners + env: + - CGO_ENABLED=0 + goos: + - linux + - darwin + goarch: + - amd64 + +brews: + - homepage: "https://github.com/hmarr/codeowners" + description: "Determine who owns what according CODEOWNERS files" + + tap: + owner: hmarr + name: homebrew-tap + token: "{{ .Env.HOMEBREW_TAP_RELEASE_TOKEN }}" + + commit_author: + name: release-bot + email: release-bot@hmarr.com + + folder: Formula + +checksum: + name_template: 'checksums.txt' + +snapshot: + name_template: "{{ .Tag }}-next" + +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:'