Skip to content

Commit

Permalink
fix: update workflow files to go mod updates (#43)
Browse files Browse the repository at this point in the history
Signed-off-by: Rui Chen <[email protected]>
  • Loading branch information
chenrui333 authored Aug 16, 2024
1 parent 6c73516 commit 898c8e9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 24 deletions.
21 changes: 6 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,19 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.17
go-version-file: "go.mod"
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Build
run: go build -mod=readonly -v .
run: go build -v .

- name: Test
run: go test -mod=readonly -v .
run: go test -v .

- name: Upload build artifact
uses: actions/upload-artifact@v2
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,11 @@ jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: 1.17
go-version-file: "go.mod"
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
Expand Down

0 comments on commit 898c8e9

Please sign in to comment.