-
Notifications
You must be signed in to change notification settings - Fork 10
41 lines (41 loc) · 907 Bytes
/
default.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: default
env:
CGO_ENABLED: 0
on:
push:
tags:
- v*
branches:
- main
pull_request:
jobs:
gotest:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- run: go test -mod=vendor -v ./...
goreleaser:
name: release
runs-on: ubuntu-latest
needs:
- gotest
steps:
- name: checkout
uses: actions/checkout@v2
if: startsWith(github.ref, 'refs/tags/')
with:
fetch-depth: 0
- name: go
uses: actions/setup-go@v2
if: startsWith(github.ref, 'refs/tags/')
with:
go-version: 1.18
- uses: goreleaser/goreleaser-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}