Skip to content

Commit

Permalink
ci(ci): update CI workflows and GoReleaser configuration
Browse files Browse the repository at this point in the history
- Add checkout repository step using actions/checkout@v4 in go.yml
- Update actions/setup-go from v3 to v5 in go.yml
- Update golangci-lint-action from v3 to v6 in go.yml
- Update actions/checkout from v3 to v4 in go.yml
- Update actions/cache from v3 to v4 in go.yml
- Update codecov-action from v3 to v4 in go.yml
- Change single quotes to double quotes for tags in goreleaser.yml
- Update actions/checkout from v3 to v4 in goreleaser.yml
- Update actions/setup-go from v3 to v5 in goreleaser.yml
- Change GoReleaser action from v4 to v6 in goreleaser.yml
- Update GoReleaser args from --rm-dist to --clean in goreleaser.yml

Signed-off-by: appleboy <[email protected]>
  • Loading branch information
appleboy committed Oct 25, 2024
1 parent f39f5bb commit f8136af
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
18 changes: 10 additions & 8 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@v3
uses: actions/setup-go@v5
with:
go-version: "^1"
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
version: latest
args: --verbose
Expand All @@ -38,16 +40,16 @@ jobs:
GOPROXY: https://proxy.golang.org
steps:
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}

- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
${{ matrix.go-build }}
Expand All @@ -61,6 +63,6 @@ jobs:
make benchmark
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
flags: ${{ matrix.os }},go-${{ matrix.go }}
23 changes: 11 additions & 12 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Goreleaser
on:
push:
tags:
- '*'
- "*"

permissions:
contents: write
Expand All @@ -12,23 +12,22 @@ jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v3

- name: Setup go
uses: actions/setup-go@v5
with:
go-version: 1.18
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
go-version: "^1"

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
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 f8136af

Please sign in to comment.