Skip to content

Commit f7a8a9f

Browse files
Add CI
1 parent 6b82538 commit f7a8a9f

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

.github/workflows/release.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: release
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
jobs:
7+
release:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 0
14+
15+
- name: Set up Go 1.15
16+
uses: actions/setup-go@v2
17+
with:
18+
go-version: 1.15
19+
- name: Run tests
20+
run: go test -race ./...
21+
22+
- name: Set up Node 13
23+
uses: actions/setup-node@v2
24+
with:
25+
node-version: '13'
26+
- name: Build front
27+
working-directory: front
28+
run: yarn install && yarn build
29+
30+
- name: Run GoReleaser
31+
uses: goreleaser/goreleaser-action@v2
32+
with:
33+
version: latest
34+
args: release --rm-dist
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}

.goreleaser.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
before:
2+
hooks:
3+
- go mod tidy
4+
- go mod download
5+
builds:
6+
- main: ./cmd/dash
7+
binary: dash
8+
env:
9+
- CGO_ENABLED=0
10+
goos:
11+
- linux
12+
- darwin
13+
goarch:
14+
- amd64
15+
16+
archives:
17+
- format: zip
18+
replacements:
19+
darwin: Darwin
20+
linux: Linux
21+
windows: Windows
22+
amd64: x86_64
23+
files:
24+
- README.md
25+
- config.yml
26+
- front/dist
27+
28+
checksum:
29+
name_template: 'checksums.txt'
30+
31+
snapshot:
32+
name_template: "{{ .Tag }}-next"
33+
34+
changelog:
35+
sort: asc
36+
filters:
37+
exclude:
38+
- '^docs:'
39+
- '^test:'

0 commit comments

Comments
 (0)