Skip to content

Commit

Permalink
chore: update GitHub Actions versions and step names
Browse files Browse the repository at this point in the history
- Update the `actions/checkout` version to `v4`
- Update the `golangci/golangci-lint-action` version to `v4`
- Update the `actions/cache` version to `v4`
- Update the `codecov/codecov-action` version to `v4`
- Change the name of the step from `Checkout` to `Checkout repository` in `goreleaser.yml`

Signed-off-by: appleboy <appleboy.tw@gmail.com>
  • Loading branch information
appleboy committed Mar 23, 2024
1 parent 21b44a5 commit 3f8744f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/go.yml
Expand Up @@ -12,14 +12,15 @@ 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 +49,7 @@ jobs:
with:
ref: ${{ github.ref }}

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
${{ matrix.go-build }}
Expand All @@ -61,6 +62,6 @@ jobs:
go test -v -covermode=atomic -coverprofile=coverage.out
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
flags: ${{ matrix.os }},go-${{ matrix.go }}
12 changes: 6 additions & 6 deletions .github/workflows/goreleaser.yml
Expand Up @@ -12,20 +12,20 @@ jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go

- name: Setup 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 3f8744f

Please sign in to comment.