Skip to content

Commit

Permalink
Add GoReleaser (#9)
Browse files Browse the repository at this point in the history
* Add GoReleaser

* formatting directive Debugf
  • Loading branch information
tiero authored Nov 27, 2020
1 parent 6c3711e commit c330778
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 17 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: goreleaser

on:
push:
tags:
- "*"
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15.2

- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v3
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist --debug
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
39 changes: 39 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
builds:
- id: "feederd"
main: ./cmd/feederd
ldflags:
- -s -w
goos:
- linux
- darwin
goarch:
- amd64
binary: feederd
checksum:
name_template: "checksums.txt"
signs:
- artifacts: checksum
args:
[
"--batch",
"-u",
"{{ .Env.GPG_FINGERPRINT }}",
"--output",
"${signature}",
"--detach-sign",
"${artifact}",
]
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
archives:
- id: feederd
format: binary
builds:
- feederd
name_template: "feederd-v{{ .Version }}-{{ .Os }}-{{ .Arch }}"
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func checkConfigParsing(config Config) error {
func LoadConfig(filePath string) (Config, error) {
_, err := os.Stat(filePath)
if os.IsNotExist(err) {
log.Debug("File not found: %s. Loading default config.\n", filePath)
log.Debugf("File not found: %s. Loading default config.\n", filePath)
return defaultConfig(), nil
}
return loadConfigFromFile(filePath)
Expand Down
16 changes: 0 additions & 16 deletions pkg/conn/socket_test.go

This file was deleted.

0 comments on commit c330778

Please sign in to comment.