45 lines
840 B
YAML
45 lines
840 B
YAML
|
name: Go
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- main
|
||
|
pull_request:
|
||
|
|
||
|
permissions:
|
||
|
contents: read
|
||
|
pull-requests: read
|
||
|
|
||
|
jobs:
|
||
|
build:
|
||
|
name: Build
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
|
||
|
- name: Set up Go 1.18
|
||
|
uses: actions/setup-go@v3
|
||
|
with:
|
||
|
go-version: '^1.18'
|
||
|
id: go
|
||
|
|
||
|
- name: Check out code into the Go module directory
|
||
|
uses: actions/checkout@v3
|
||
|
with:
|
||
|
lfs: true
|
||
|
|
||
|
- name: golangci-lint
|
||
|
uses: golangci/golangci-lint-action@v3
|
||
|
with:
|
||
|
only-new-issues: true
|
||
|
skip-go-installation: true
|
||
|
|
||
|
- run: go test ./...
|
||
|
|
||
|
- name: Run GoReleaser
|
||
|
uses: goreleaser/goreleaser-action@v2
|
||
|
with:
|
||
|
version: latest
|
||
|
args: release --rm-dist
|
||
|
env:
|
||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|