Skip to content

fix(deps): bump actions/checkout from 3 to 4 #38

fix(deps): bump actions/checkout from 3 to 4

fix(deps): bump actions/checkout from 3 to 4 #38

Workflow file for this run

name: Go
on:
push:
tags:
- v*
branches:
- main
pull_request:
branches:
- main
permissions:
contents: write
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: ^1.18
- name: Test Coverage
run: go test -v ./... -race -coverprofile=coverage.txt -covermode=atomic
- name: Upload coverage to Codecov
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
release:
name: Release
needs: [test]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch all tags
run: git fetch --force --tags
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: ^1.18
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}