Skip to content

upgrade actions

upgrade actions #81

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v5
with:
go-version: '^1.20.0'
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Get dependencies
run: go get -v -t -d ./...
- name: Build
run: go build -v ./...
- name: Lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.64.8
- name: Test
run: go test -race -v -covermode atomic -coverprofile=covprofile ./...
- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: covprofile
goreleaser:
name: Build and release binary
needs: test
runs-on: macos-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '1.20'
- uses: goreleaser/goreleaser-action@v7
with:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}