act/.github/workflows/push.yml

46 lines
983 B
YAML
Raw Normal View History

name: push
2020-03-02 10:04:30 -06:00
on: [push, pull_request]
jobs:
2020-02-24 16:43:03 -06:00
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker://golangci/golangci-lint:v1.23.8
2020-02-24 16:43:03 -06:00
with:
args: golangci-lint run
env:
CGO_ENABLED: 0
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
2020-02-24 14:48:12 -06:00
- uses: actions/setup-go@v1
with:
go-version: 1.14
2020-02-24 14:48:12 -06:00
- run: go test -cover ./...
env:
CGO_ENABLED: 0
2020-02-24 17:04:33 -06:00
release:
2020-02-24 17:05:41 -06:00
if: startsWith(github.ref, 'refs/tags/v')
needs:
2020-02-24 17:04:33 -06:00
- 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 }}