Skip to content

Bump actions/setup-go from 5 to 6 in /.github/workflows (#11) #37

Bump actions/setup-go from 5 to 6 in /.github/workflows (#11)

Bump actions/setup-go from 5 to 6 in /.github/workflows (#11) #37

Workflow file for this run

name: Go Build
on:
push:
branches:
- 'master'
- 'releases/v*'
tags:
- 'v*'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Cache go module
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
id: go
- name: Build and Test
run: go test -v -race -cover ./...
release:
runs-on: ubuntu-latest
needs: build
name: Build, Tag, Push
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: GoReleaser
uses: goreleaser/goreleaser-action@v6
if: success()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAP_GITHUB_TOKEN: ${{ secrets.GH_PAT }}
with:
args: release --clean --auto-snapshot