-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from omissis/main-fork
Review and merge all upstream's pull requests
- Loading branch information
Showing
44 changed files
with
2,024 additions
and
532 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,46 @@ | ||
--- | ||
name: development | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- introduce-gh-actions | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: read | ||
|
||
concurrency: | ||
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
qa: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup Golang | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: "^1.19.4" | ||
- name: Lint Go files | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.52.2 | ||
args: -v --color=always --config=.rules/.golangci.yml ./... | ||
- name: Run tests | ||
run: go test -v -race -covermode=atomic -coverprofile=coverage.out ./... | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
- name: Build binaries | ||
uses: goreleaser/goreleaser-action@v3 | ||
with: | ||
distribution: goreleaser | ||
version: "1.13.1" | ||
args: release --debug --snapshot --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GO_VERSION: "1.19.4" |
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,65 @@ | ||
--- | ||
name: tag | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+" | ||
- "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+" | ||
- "v[0-9]+.[0-9]+.[0-9]+-beta[0-9]+" | ||
- "v[0-9]+.[0-9]+.[0-9]+-alpha[0-9]+" | ||
|
||
permissions: | ||
contents: write | ||
|
||
concurrency: | ||
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Fetch all tags | ||
run: git fetch --force --tags | ||
- name: Setup Golang | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: "^1.19.4" | ||
- name: Lint Go files | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.52.2 | ||
args: -v --color=always --config=.rules/.golangci.yml ./... | ||
- name: Run tests | ||
run: go test -v -race -covermode=atomic -coverprofile=coverage.out ./... | ||
- name: Run GoReleaser for pre-release | ||
if: ${{ contains(github.ref_name, '-') }} | ||
uses: goreleaser/goreleaser-action@v3 | ||
with: | ||
distribution: goreleaser | ||
version: "1.13.1" | ||
args: release --debug --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
GO_VERSION: "1.19.4" | ||
- name: Log in to Docker Hub | ||
if: ${{ !contains(github.ref_name, '-') }} | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Run GoReleaser for release | ||
if: ${{ !contains(github.ref_name, '-') }} | ||
uses: goreleaser/goreleaser-action@v3 | ||
with: | ||
distribution: goreleaser | ||
version: "1.13.1" | ||
args: release --debug --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
GO_VERSION: "1.19.4" |
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,2 +1,6 @@ | ||
.env | ||
.envrc | ||
.idea | ||
.tool-versions | ||
bin | ||
coverage.out |
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,58 @@ | ||
--- | ||
project_name: go-jsonschema | ||
before: | ||
hooks: | ||
- go mod tidy | ||
builds: | ||
- main: cmd/gojsonschema/main.go | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
ldflags: | ||
- -s -w -X main.version={{.Version}} -X main.gitCommit={{.Commit}} -X main.buildTime={{.Date}} -X main.goVersion={{.Env.GO_VERSION}} -X main.osArch={{.Arch}} | ||
archives: | ||
- replacements: | ||
darwin: Darwin | ||
linux: Linux | ||
windows: Windows | ||
386: i386 | ||
amd64: x86_64 | ||
checksum: | ||
name_template: "checksums.txt" | ||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- "^docs:" | ||
- "^test:" | ||
release: | ||
github: | ||
owner: omissis | ||
name: go-jsonschema | ||
name_template: "{{ .Tag }}" | ||
prerelease: auto | ||
brews: | ||
- name: go-jsonschema | ||
tap: | ||
owner: omissis | ||
name: homebrew-go-jsonschema | ||
skip_upload: auto | ||
folder: Formula | ||
homepage: "https://gihub.com/omissis/go-jsonschema" | ||
description: "go-jsonschema binary" | ||
test: | | ||
system "#{bin}/go-jsonschema" | ||
install: | | ||
bin.install 'go-jsonschema' | ||
dockers: | ||
- skip_push: auto | ||
image_templates: | ||
- "omissis/go-jsonschema:latest" | ||
- "omissis/go-jsonschema:v{{ .Major }}" | ||
- "omissis/go-jsonschema:v{{ .Major }}.{{ .Minor }}" | ||
- "omissis/go-jsonschema:{{ .Tag }}" |
Oops, something went wrong.