refactor CI workflows to streamline linting and release processes
This commit is contained in:
@@ -23,6 +23,7 @@ jobs:
|
|||||||
- name: Lint
|
- name: Lint
|
||||||
uses: golangci/golangci-lint-action@v3
|
uses: golangci/golangci-lint-action@v3
|
||||||
with:
|
with:
|
||||||
|
args: -D errcheck
|
||||||
version: latest
|
version: latest
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ on:
|
|||||||
- 'v*'
|
- 'v*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
release:
|
||||||
name: Lint
|
name: Build versioned release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -25,46 +25,12 @@ jobs:
|
|||||||
- name: Lint
|
- name: Lint
|
||||||
uses: golangci/golangci-lint-action@v3
|
uses: golangci/golangci-lint-action@v3
|
||||||
with:
|
with:
|
||||||
|
args: -D errcheck
|
||||||
version: latest
|
version: latest
|
||||||
|
|
||||||
test:
|
|
||||||
name: Test
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up go
|
|
||||||
uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version-file: 'go.mod'
|
|
||||||
check-latest: true
|
|
||||||
cache: true
|
|
||||||
|
|
||||||
- name: Get go dependencies
|
|
||||||
run: |
|
|
||||||
go mod tidy
|
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: go test -race -v -shuffle=on ./...
|
run: go test -race -v -shuffle=on ./...
|
||||||
|
|
||||||
release:
|
|
||||||
name: Build versioned release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup go
|
|
||||||
uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version-file: 'go.mod'
|
|
||||||
check-latest: true
|
|
||||||
cache: true
|
|
||||||
|
|
||||||
- name: Install go dependencies
|
|
||||||
run: go mod tidy
|
|
||||||
|
|
||||||
- name: Build for linux
|
- name: Build for linux
|
||||||
run: |
|
run: |
|
||||||
go build -o bin/SteamCache2-${VERSION#v}-${BUILD}-${GOOS}-${GOARCH} main.go
|
go build -o bin/SteamCache2-${VERSION#v}-${BUILD}-${GOOS}-${GOARCH} main.go
|
||||||
|
|||||||
Reference in New Issue
Block a user