Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add goreleaser & a gh workflow #503

Merged
merged 2 commits into from Mar 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,29 @@
name: Release

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.16
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35 changes: 35 additions & 0 deletions .goreleaser.yml
@@ -0,0 +1,35 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
---
archives:
-
replacements:
386: i386
amd64: x86_64
darwin: Darwin
linux: Linux
windows: Windows
before:
hooks:
- "go mod download"
- "go generate ./..."
builds:
-
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows

changelog:
filters:
exclude:
- "^docs:"
- "^test:"
sort: asc
checksum:
name_template: checksums.txt
snapshot:
name_template: "{{ .Tag }}-next"
project_name: revive
4 changes: 2 additions & 2 deletions rule/blank-imports.go
Expand Up @@ -22,8 +22,8 @@ func (r *BlankImportsRule) Apply(file *lint.File, _ lint.Arguments) []lint.Failu
}

const (
message = "a blank import should be only in a main or test package, or have a comment justifying it"
category = "imports"
message = "a blank import should be only in a main or test package, or have a comment justifying it"
category = "imports"

embedImportPath = `"embed"`
)
Expand Down
2 changes: 1 addition & 1 deletion rule/struct-tag.go
Expand Up @@ -168,7 +168,7 @@ func (w lintStructTagRule) checkJSONTag(name string, options []string) (string,
case "":
// special case for JSON key "-"
if name != "-" {
return "option can not be empty in JSON tag", false
return "option can not be empty in JSON tag", false
}
default:
return fmt.Sprintf("unknown option '%s' in JSON tag", opt), false
Expand Down