Skip to content

Commit eea48cf

Browse files
committed
Adds CI workflow.
1 parent 1eb6055 commit eea48cf

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
on: [push]
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
permissions:
7+
contents: read
8+
packages: write
9+
steps:
10+
- uses: actions/checkout@v2
11+
with:
12+
fetch-depth: 0
13+
- name: Setup Go
14+
uses: actions/setup-go@v2
15+
with:
16+
go-version: '1.17.0'
17+
- name: Install dependencies
18+
run: go get
19+
- name: Test
20+
run: go test -v ./...
21+
- name: Build
22+
run: go build
23+
- name: Release
24+
uses: goreleaser/goreleaser-action@v2
25+
if: startsWith(github.ref, 'refs/tags/')
26+
with:
27+
version: latest
28+
args: release --rm-dist
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }}

0 commit comments

Comments
 (0)