Skip to content

chore(deps): bump actions/setup-go from 4 to 5 (#47) #213

chore(deps): bump actions/setup-go from 4 to 5 (#47)

chore(deps): bump actions/setup-go from 4 to 5 (#47) #213

Workflow file for this run

name: build
on:
push:
branches:
- 'main'
tags:
- 'v*'
pull_request:
jobs:
build:
strategy:
matrix:
go-version: [ ~1.16 , ~1.17 ]
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: go mod tidy
- run: go test -v -failfast -race -coverpkg=./... -covermode=atomic -coverprofile=coverage.txt ./...
- uses: codecov/codecov-action@v3
if: matrix.os == 'ubuntu-latest'
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt
- uses: goreleaser/goreleaser-action@v5
if: success() && startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-latest' && matrix.go-version == '~1.17'
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}