diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..df1e941 --- /dev/null +++ b/.github/workflows/release.yml @@ -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 }} diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..e491dcc --- /dev/null +++ b/.goreleaser.yml @@ -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 }}" diff --git a/config/config.go b/config/config.go index ed9908f..f97e77e 100644 --- a/config/config.go +++ b/config/config.go @@ -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) diff --git a/pkg/conn/socket_test.go b/pkg/conn/socket_test.go deleted file mode 100644 index b2f0710..0000000 --- a/pkg/conn/socket_test.go +++ /dev/null @@ -1,16 +0,0 @@ -package conn - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -const ( - kraken = "ws.kraken.com" -) - -func TestConnectToSocket(t *testing.T) { - _, err := ConnectToSocket(kraken) - assert.Nil(t, err) -}