From 1f3265a4750f12147bf72d66cba5b65fc8e1266f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20Galicz?= Date: Wed, 9 Oct 2024 11:11:19 +0200 Subject: [PATCH] build: :package: add GitHub release workflow and update GoReleaser config --- .github/workflows/release.yml | 31 +++++++++++++++++++++++++++++++ .goreleaser.yaml | 3 --- 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4f54ae4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,31 @@ +name: Release + +on: + pull_request: + push: + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: ">=1.22.5" + + - name: Run tests + run: go test ./... + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v3 + with: + distribution: goreleaser + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 4094b76..32d55ac 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -12,8 +12,6 @@ before: hooks: # You may remove this if you don't use go modules. - go mod tidy - # you may remove this if you don't need go generate - - go generate ./... builds: - env: @@ -21,7 +19,6 @@ builds: goos: - linux - windows - - darwin archives: - format: tar.gz