Skip to content

Update golangci/golangci-lint-action action to v5 #58

Update golangci/golangci-lint-action action to v5

Update golangci/golangci-lint-action action to v5 #58

Workflow file for this run

---
name: Go
on:
push:
tags:
- v*
branches:
- main
pull_request:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.17
- name: Checkout
uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v5
with:
version: latest
build:
name: Build
runs-on: ubuntu-latest
env:
CGO_ENABLED: 0
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.17
- name: Checkout
uses: actions/checkout@v4
- name: Vet
run: go vet -v ./...
- name: Test
run: go test -v ./...
- name: Build binary (for testing)
run: go build -v -trimpath -ldflags="-s -w -buildid=" -o staticassetlint .
- name: Upload binary (for testing)
uses: actions/upload-artifact@v4
with:
name: staticassetlint
path: staticassetlint
if-no-files-found: error