From 803b283cd800a638c71f16d892cd6371d652dc2f Mon Sep 17 00:00:00 2001 From: catatsuy Date: Sun, 9 Jun 2024 15:59:03 +0900 Subject: [PATCH] Update release workflow with Go 1.22.4 and GoReleaser v6 --- .github/workflows/go.yml | 28 +++++++++++++--------------- .github/workflows/release.yml | 8 ++++---- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index db5cf8b..6004dfb 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,26 +1,24 @@ name: Go on: [push] jobs: - test: name: Build runs-on: ubuntu-latest strategy: matrix: - go: [ '1.20.x' ] + go: ["1.22.x"] steps: + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go }} + id: go - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: ${{ matrix.go }} - id: go - - - name: Check out code into the Go module directory - uses: actions/checkout@v4 + - name: Check out code into the Go module directory + uses: actions/checkout@v4 - - name: test - run: | - go vet ./... - go test -shuffle on -cover -count 10 ./... - go build + - name: test + run: | + go vet ./... + go test -shuffle on -cover -count 10 ./... + go build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ff46aa6..912065f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: release on: push: tags: - - "v[0-9]+.[0-9]+.[0-9]+" + - "v[0-9]+.[0-9]+.[0-9]+" jobs: goreleaser: runs-on: ubuntu-latest @@ -12,11 +12,11 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 1.20.x + go-version: 1.22.4 - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v5 + uses: goreleaser/goreleaser-action@v6 with: version: latest - args: release --rm-dist + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}