Fix linting #936
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
on: [push] | |
name: Release | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
if: startswith(github.ref, 'refs/heads') # Only run on branches | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: "1.22" | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
- name: "Run tests" | |
run: | | |
make test | |
build: | |
name: Upload Release Asset | |
runs-on: ubuntu-latest | |
if: startswith(github.ref, 'refs/tags/v') # Push events to matching v*, i.e. v1.0, v20.15.10 | |
env: | |
GO111MODULE: "on" | |
GOPATH: ${{ github.workspace }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
path: ./src/github.com/${{ github.repository }} | |
- name: Login to Docker Package Registry | |
shell: bash | |
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: "1.22" | |
- name: Get the version | |
id: get_version | |
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | |
- name: goreleaser | |
uses: goreleaser/goreleaser-action@v2 | |
with: | |
version: latest | |
workdir: ./src/github.com/${{ github.repository }} | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |