-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Carlos Alexandro Becker <[email protected]>
- Loading branch information
Showing
9 changed files
with
121 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
github: [caarlos0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ~1.16 | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Download Go modules | ||
run: go mod tidy | ||
|
||
- name: Build | ||
run: go build -v ./... | ||
|
||
- name: Test | ||
run: go test ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: goreleaser | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
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: | ||
distribution: goreleaser-pro | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | ||
FURY_TOKEN: ${{ secrets.FURY_TOKEN }} | ||
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} | ||
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }} | ||
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }} | ||
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }} | ||
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: lint | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
golangci: | ||
name: lint | ||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ~1.16 | ||
|
||
- uses: actions/checkout@v2 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
# Use supplied Go version | ||
skip-go-installation: true | ||
# Optional: golangci-lint command line arguments. | ||
args: --issues-exit-code=0 | ||
# Optional: working directory, useful for monorepos | ||
# working-directory: somedir | ||
# Optional: show only new issues if it's a pull request. The default value is `false`. | ||
only-new-issues: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
dist | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
linters: | ||
enable: | ||
- thelper | ||
- gofumpt | ||
- tparallel | ||
- unconvert | ||
- unparam | ||
- wastedassign | ||
- revive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,13 @@ | ||
# This is an example goreleaser.yaml file with some sane defaults. | ||
# Make sure to check the documentation at http://goreleaser.com | ||
before: | ||
hooks: | ||
- go mod download | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
goarch: | ||
- amd64 | ||
goos: | ||
- linux | ||
- darwin | ||
dockers: | ||
- image_templates: | ||
- "caarlos0/jsonfmt:latest" | ||
- "caarlos0/jsonfmt:{{ .Tag }}" | ||
build_flag_templates: | ||
- "--label=org.label-schema.schema-version=1.0" | ||
- "--label=org.label-schema.version={{ .Version }}" | ||
- "--label=org.label-schema.name={{ .ProjectName }}" | ||
brews: | ||
- | ||
tap: | ||
owner: caarlos0 | ||
name: homebrew-tap | ||
folder: Formula | ||
homepage: https://carlosbecker.com | ||
variables: | ||
homepage: https://github.com/caarlos0/jsonfmt | ||
description: Like gofmt, but for JSON files | ||
test: | | ||
system "#{bin}/gofmt -v" | ||
# TODO: add scoop support | ||
# scoop: | ||
# bucket: | ||
# owner: caarlos0 | ||
# name: scoop-bucket | ||
# homepage: http://carlosbecker.com | ||
# description: Like gofmt, but for JSON files | ||
# license: MIT | ||
nfpms: | ||
- | ||
homepage: http://carlosbecker.com | ||
description: Like gofmt, but for JSON files | ||
maintainer: Carlos Alexandro Becker <[email protected]> | ||
license: MIT | ||
vendor: Carlos Becker | ||
formats: | ||
- deb | ||
- rpm | ||
# TODO: apk | ||
includes: | ||
- from_url: | ||
url: caarlos0/goreleaserfiles/main/build.yml | ||
- from_url: | ||
url: caarlos0/goreleaserfiles/main/package.yml | ||
- from_url: | ||
url: caarlos0/goreleaserfiles/main/release.yml | ||
|
||
furies: | ||
- account: caarlos0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters