refactor CI workflows to streamline linting and release processes
This commit is contained in:
@@ -23,6 +23,7 @@ jobs:
|
||||
- name: Lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
args: -D errcheck
|
||||
version: latest
|
||||
|
||||
test:
|
||||
|
||||
@@ -5,49 +5,6 @@ on:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint
|
||||
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: Lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
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
|
||||
run: go test -race -v -shuffle=on ./...
|
||||
|
||||
release:
|
||||
name: Build versioned release
|
||||
runs-on: ubuntu-latest
|
||||
@@ -65,6 +22,15 @@ jobs:
|
||||
- name: Install go dependencies
|
||||
run: go mod tidy
|
||||
|
||||
- name: Lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
args: -D errcheck
|
||||
version: latest
|
||||
|
||||
- name: Test
|
||||
run: go test -race -v -shuffle=on ./...
|
||||
|
||||
- name: Build for linux
|
||||
run: |
|
||||
go build -o bin/SteamCache2-${VERSION#v}-${BUILD}-${GOOS}-${GOARCH} main.go
|
||||
|
||||
Reference in New Issue
Block a user