Skip to content

chore: fix goreleaser #136

chore: fix goreleaser

chore: fix goreleaser #136

Workflow file for this run

name: Test/Tag
on:
pull_request:
push:
branches:
- main
jobs:
unit-test:
if: ${{ !startsWith(github.event.head_commit.message, 'tag') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-go
- name: Test
run: go test -v -covermode=count -coverprofile=.coverage.out ./... -coverpkg=./...
- name: Coveralls upload
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: .coverage.out
lint:
if: ${{ !startsWith(github.event.head_commit.message, 'tag') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-go
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
args: '-v'
tag:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs:
- unit-test
- lint
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0' # https://github.com/actions/checkout/issues/217
token: ${{ secrets.CI_TOKEN }}
- name: Tag
run: |
version=$(.github/semver.sh)
git config --global user.email "[email protected]"
git config --global user.name "Automatic bumper"
git tag "$version"
git push --tags