goveal/.github/workflows/go.yml
2022-03-22 20:48:56 +01:00

61 lines
1.2 KiB
YAML

name: Go
on:
push:
tags:
- v*
branches:
- main
pull_request:
permissions:
contents: write
issues: write
packages: write
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: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
lfs: true
fetch-depth: 0
- name: Install Task
uses: arduino/setup-task@v1
- name: Download assets
run: task download-assets
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
- name: Build & test
run: task test
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}