Update actions/upload-artifact action to v4 #52
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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@v3 | |
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 |