Skip to content

Use cache action in release workflow #202

Use cache action in release workflow

Use cache action in release workflow #202

Workflow file for this run

---
name: Go
on:
push:
branches: [master]
pull_request:
jobs:
build:
name: Build
runs-on: ubuntu-22.04
strategy:
matrix:
go: ["1.21"]
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/.cache/golangci-lint
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
${{ runner.os }}-go-
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
id: go
- name: Verify go mod
run: make go-mod-verify
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
args: --timeout=10m
skip-cache: true
- name: Test
run: make test
- name: Crossbuild
run: make crossbuild