diff --git a/.github/workflows/goreleaser.yaml b/.github/workflows/goreleaser.yaml new file mode 100644 index 0000000..4410b94 --- /dev/null +++ b/.github/workflows/goreleaser.yaml @@ -0,0 +1,27 @@ +name: goreleaser + +on: + push: + tags: + - "*" + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: actions/setup-go@v2 + with: + go-version: "~1.17" + - uses: goreleaser/goreleaser-action@v2 + with: + distribution: goreleaser + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 09e1669..6d8bd42 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,6 @@ # Go coverage.out + +# GoReleaser +dist/ diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..cee062a --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,20 @@ +before: + hooks: + - go mod tidy +builds: + - main: ./cmd/changeloguru + goos: + - linux + - windows + - darwin + goarch: + - amd64 + - arm64 +universal_binaries: + - replace: true +archives: + - format_overrides: + - goos: windows + format: zip +changelog: + skip: true