diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0a2ff7f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,26 @@ +name: release +on: + push: + tags: + - 'v*' +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.19 + cache: true + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v3 + with: + distribution: goreleaser + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..f995f60 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,19 @@ +builds: + - main: ./cmd/pipesore/main.go + env: + - CGO_ENABLED=0 + goos: + - linux + - darwin +archives: + - replacements: + darwin: macOS + 386: i386 +checksum: + name_template: 'checksums.txt' +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' diff --git a/README.md b/README.md index 3e82e32..db8fa1f 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,8 @@ ![version](https://img.shields.io/github/v/tag/dyson/pipesore?label=version) [![test coverage](https://coveralls.io/repos/github/dyson/pipesore/badge.svg?branch=main)](https://coverallsio/github/dyson/pipesore?branch=main) -[![build workflow](https://github.com/dyson/pipesore/actions/workflows/build.yml/badge.svg)](https://github.com/dyson/pipesore/actions/workflows/build.yml) +[![build](https://github.com/dyson/pipesore/actions/workflows/build.yml/badge.svg)](https://github.com/dyson/pipesore/actions/workflows/build.yml) +[![release](https://github.com/dyson/pipesore/actions/workflows/release.yml/badge.svg)](https://github.com/dyson/pipesore/actions/workflows/release.yml) [![license](https://img.shields.io/github/license/dyson/pipesore.svg)](https://github.com/dyson/pipesore/blob/master/LICENSE) *Pipe* because it's similar to unix like pipes and *sore* because the initial