Skip to content

Merge pull request #1015 from ripienaar/dependencies #3

Merge pull request #1015 from ripienaar/dependencies

Merge pull request #1015 from ripienaar/dependencies #3

Workflow file for this run

name: Release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Install deps
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest
go install github.com/client9/misspell/cmd/misspell@latest
- name: Lint
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
PATH=$PATH:$GOPATH/bin
GO_LIST=$(go list ./...)
$(exit $(go fmt $GO_LIST | wc -l))
go vet -composites=false $GO_LIST
find . -type f -name "*.go" | xargs misspell -error -locale US
staticcheck -f stylish $GO_LIST
- name: Test
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
set -e
cd nats
# Required, tests execute built binary
go build
go test -v --failfast -p=1 ./...
cd ../cli
go test -v --failfast -p=1 ./...
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}