Merge pull request #6 from mdm-code/add-release #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
go: [ '1.21' ] | |
os: [ windows-latest, ubuntu-latest, macos-latest ] | |
runs-on: ${{ matrix.os }} | |
name: ${{ matrix.go }}/${{ matrix.os }} | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install dependencies | |
run: | | |
go version | |
go install golang.org/x/lint/golint@latest | |
- name: Build | |
run: make build | |
- name: Test | |
run: go test -v -coverprofile='coverage.txt' -covermode='atomic' ./... | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
verbose: true | |
release-check: | |
uses: ./.github/workflows/release.yaml | |
with: | |
args: --snapshot |