Skip to content

feat: Tidy up key logic #9

feat: Tidy up key logic

feat: Tidy up key logic #9

Workflow file for this run

name: Go
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.18
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./... -race -coverprofile=coverage.txt -covermode=atomic
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.1
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
if: github.ref == 'refs/heads/main'
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest