Skip to content
This repository was archived by the owner on Apr 25, 2024. It is now read-only.

Commit 9ec336b

Browse files
committed
Add github actions
1 parent 0c3685f commit 9ec336b

2 files changed

Lines changed: 53 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: build
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
14+
- name: Set up Go
15+
uses: actions/setup-go@v1
16+
with:
17+
go-version: 1.13.x
18+
19+
- name: Run tests
20+
run: go test -v ./...
21+

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
goreleaser:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
15+
- name: Fetch tags
16+
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
17+
18+
- name: Unshallow
19+
run: git fetch --prune --unshallow
20+
21+
- name: Set up Go
22+
uses: actions/setup-go@v1
23+
with:
24+
go-version: 1.13.x
25+
26+
- name: Run GoReleaser
27+
uses: goreleaser/goreleaser-action@v1
28+
with:
29+
version: latest
30+
args: release --rm-dist
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)