forgejo-runner-act/.github/workflows/push.yml
lshamis 644bc2b635
Simpler list view (#382)
* Simpler list view

* lint

* readding graph viz with -g/--graph

Co-authored-by: Leonid Shamis <lshamis@bob.localdomain>
Co-authored-by: Casey Lee <cplee@nektos.com>
2020-10-12 10:26:22 -07:00

65 lines
1.4 KiB
YAML

name: push
on: [push, pull_request]
jobs:
lint:
name: 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:
name: 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
snapshot:
name: Snapshot
if: ${{ github.event_name == 'pull_request' }}
needs:
- lint
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --snapshot --rm-dist
env:
SNAPSHOT_VERSION: "v0.0.0"
release:
name: 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 }}