diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1b8b8596..4cce248e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,15 +8,17 @@ jobs: goreleaser: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Unshallow - run: git fetch --prune --unshallow - - uses: actions/setup-go@v1 + - name: Checkout + uses: actions/checkout@v4 with: - go-version: 1.21.x - - uses: goreleaser/goreleaser-action@v2 + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v5 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 with: - version: latest - args: release --rm-dist + distribution: goreleaser + version: '~> v2' + args: release --clean env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN } diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 53484cfc..eb7ded7f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,7 @@ on: [push, pull_request] name: Test jobs: - test: + go-test: strategy: matrix: go-version: [1.21, 1.x] # Test 1.21 and tip @@ -34,3 +34,20 @@ jobs: run: | go test -timeout 10s -v -tags=windows ./... go test -race -timeout 10s -v -tags=windows ./... + goreleaser-test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v5 + - name: Build GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + version: '~> v2' + args: build --snapshot --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}