Skip to content

Commit 677a721

Browse files
Use goreleaser for builds
1 parent 5de5f0d commit 677a721

File tree

4 files changed

+67
-14
lines changed

4 files changed

+67
-14
lines changed

.github/workflows/release.yml

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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.gopath/
22
bin/
3+
dist/
34
main
45
conf/freno.local.conf.json
56
.vendor/

.goreleaser.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
before:
2+
hooks:
3+
- go mod download
4+
- go test -v -covermode=atomic ./pkg/...
5+
builds:
6+
- env:
7+
- CGO_ENABLED=0
8+
goos:
9+
- linux
10+
- darwin
11+
ldflags:
12+
- -w -s
13+
- -X main.AppVersion={{.Version}} -X main.GitCommit={{.Commit}}
14+
main: ./cmd/freno/main.go
15+
checksum:
16+
name_template: 'checksums.txt'
17+
changelog:
18+
sort: asc
19+
nfpms:
20+
- vendor: GitHub
21+
homepage: https://github.com/github/freno
22+
description: Cooperative, highly available throttler service
23+
license: MIT
24+
bindir: /usr/bin
25+
config_files:
26+
"resources/freno.conf.skeleton.json": "/etc/freno.conf.json"
27+
files:
28+
"resources/etc/init.d/freno": "/etc/init.d/freno"
29+
empty_folders:
30+
- "/var/lib/freno"
31+
formats:
32+
- deb
33+
- rpm
34+
release:
35+
github:
36+
owner: github
37+
name: freno

.travis.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)