diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0266208..bd32be1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,12 +3,23 @@ on: push: tags: - "v*" -permissions: - contents: write jobs: - release: + goreleaser: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: cli/gh-extension-precompile@v1 + with: + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17 + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..14be062 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,17 @@ +before: + hooks: + - go mod tidy +builds: + - env: + - CGO_ENABLED=0 + goos: + - darwin + - linux + - windows +archives: + - name_template: "{{ .Os }}-{{ .Arch }}" + format: binary +snapshot: + name_template: "{{ .Tag }}-next" +changelog: + use: github-native