Skip to content

RPC Plugin System

RPC Plugin System #379

Workflow file for this run

name: Go
on:
push:
branches: [ main, 1.x ]
tags: [ 'v*.*.*' ]
paths-ignore:
- 'docs/**'
pull_request:
branches: [ main, 1.x ]
paths-ignore:
- 'docs/**'
jobs:
test-build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@main
- name: Set up Go
uses: actions/setup-go@main
with:
go-version: 1.21
- name: Run generators
run: go generate ./...
- name: Vet
run: go vet ./...
- name: Build
run: go build -ldflags="-s -w" -o build/shipshape . && ls -lh build/shipshape
- name: List check types
run: ./build/shipshape config list-checks
- name: Test
run: go test -v -race ./... -coverprofile=build/coverage.out
- uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: build/coverage.out
- name: Upload test coverage
uses: actions/upload-artifact@main
with:
name: build
path: build
if: github.ref_name == 'main'
publish-binary:
needs: test-build
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@main
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@main
with:
go-version: 1.21
- name: Fetch all tags
run: git fetch --force --tags
if: startsWith(github.ref_name, 'v')
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@master
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
if: startsWith(github.ref_name, 'v')
publish-docker:
needs:
- test-build
- publish-binary
uses: ./.github/workflows/docker-publish.yml