b7fcf137ab
* fix #132 - publish chocolatey package for act * add missing files to pass validation * remove extra choco step
45 lines
983 B
YAML
45 lines
983 B
YAML
name: push
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: docker://golangci/golangci-lint:v1.23.8
|
|
with:
|
|
args: golangci-lint run
|
|
env:
|
|
CGO_ENABLED: 0
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-go@v1
|
|
with:
|
|
go-version: 1.14
|
|
- run: go test -cover ./...
|
|
env:
|
|
CGO_ENABLED: 0
|
|
|
|
release:
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
needs:
|
|
- lint
|
|
- test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: GoReleaser
|
|
uses: goreleaser/goreleaser-action@v1
|
|
with:
|
|
version: latest
|
|
args: release --rm-dist
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
|
|
- name: Chocolatey
|
|
uses: ./.github/actions/choco
|
|
with:
|
|
version: ${{ github.ref }}
|
|
apiKey: ${{ secrets.CHOCO_APIKEY }}
|