Skip to content

Commit

Permalink
Update GitHub workflows for build, lint and release
Browse files Browse the repository at this point in the history
  • Loading branch information
zaidfadhil committed Jun 1, 2024
1 parent df9ea8d commit 6eb9512
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 9 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: build

on:
push:
Expand All @@ -13,16 +13,15 @@ jobs:
name: build
strategy:
matrix:
go-version: ["1.22"]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
- name: checkout code
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Build
go-version-file: go.mod
check-latest: true
- name: build
run: |
make build
24 changes: 24 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: lint

on:
push:
pull_request:

jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- name: install dependencies
run: |
go get -v -t -d ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.58
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
go-version-file: go.mod
check-latest: true
- name: GoReleaser
- name: goreleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
Expand Down

0 comments on commit 6eb9512

Please sign in to comment.