Skip to content

Commit

Permalink
ci: update GitHub Actions workflows to use latest versions and config…
Browse files Browse the repository at this point in the history
…urations

- Update the `actions/checkout` version to `v4` in the `go.yml` workflow
- Update the `golangci/golangci-lint-action` version to `v4` in the `go.yml` workflow
- Update the `actions/cache` version to `v4` in the `go.yml` workflow
- Update the `go-version-file` argument to use `go.mod` in the `goreleaser.yml` workflow
- Change the `args` argument to `release --clean` in the `goreleaser.yml` workflow

Signed-off-by: appleboy <[email protected]>
  • Loading branch information
appleboy committed Mar 23, 2024
1 parent 776a55b commit 390123d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup go
uses: actions/setup-go@v5
with:
go-version: "^1"
- name: Checkout repository
uses: actions/checkout@v4
go-version-file: "go.mod"

- name: Setup golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
with:
args: --verbose
test:
Expand Down Expand Up @@ -48,7 +50,7 @@ jobs:
with:
ref: ${{ github.ref }}

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
${{ matrix.go-build }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "^1"
go-version-file: "go.mod"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 390123d

Please sign in to comment.