Skip to content
This repository was archived by the owner on Dec 27, 2024. It is now read-only.

ADHOC: Lint the code, then format it #48

ADHOC: Lint the code, then format it

ADHOC: Lint the code, then format it #48

Workflow file for this run

name: Release
on:
pull_request:
push:
tags:
- v*
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.23.4
check-latest: true
- name: Setup cache
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-
- name: Install dependencies
run: go mod tidy
- name: Lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.6
- name: Build
run: make build
- name: Test
run: make test
- name: Release
uses: goreleaser/goreleaser-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
install-only: ${{ github.event_name == 'pull_request' }}
distribution: goreleaser
version: 1.8.3
args: release --rm-dist