Skip to content

Commit

Permalink
initial init
Browse files Browse the repository at this point in the history
  • Loading branch information
Jmainguy committed May 11, 2021
0 parents commit 17b0512
Show file tree
Hide file tree
Showing 10 changed files with 974 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
on:
push:

name: push
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.29
test:
name: Test with Coverage
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: '1.16.3'

- name: Get Build Tools
run: |
GO111MODULE=on go get github.com/ory/go-acc
- name: Add $GOPATH/bin to $PATH
run: |
echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH"
- name: git checkout
uses: actions/checkout@v2

- name: Install dependencies
run: |
go mod download
- name: Run Unit tests
run: |
go-acc .
- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: coverage.txt

build:
name: Lint and build
runs-on: ubuntu-latest
steps:
- name: install go
uses: actions/setup-go@v2
with:
go-version: '1.16.3'

- name: git checkout
uses: actions/checkout@v2

- name: install lint
run: GO111MODULE=off go get golang.org/x/lint/golint

- name: run golint and go fmt
run: ./tests/fmtlint.sh

- name: go build
run: go build
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
on:
push:
tags:
- '*'

name: release
jobs:
release:
name: run goreleaser
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: install go
uses: actions/setup-go@v2
with:
go-version: '1.16.3'

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ghreport
70 changes: 70 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
project_name: ghreport
env:
- GO111MODULE=on
before:
hooks:
# you may remove this if you don't use vgo
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64

archives:
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
replacements:
darwin: Darwin
linux: Linux
windows: Windows
amd64: x86_64
format_overrides:
- goos: windows
format: zip

nfpms:
- file_name_template: '{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
homepage: https://github.com/Jmainguy/ghreport
description: Check Github for Pull Requests, that are not Drafts, in repos the user cares about.
maintainer: Jonathan Seth Mainguy <[email protected]>
license: GPLv2
vendor: Jmainguy
release: 1
replacements:
amd64: x86_64
overrides:
rpm:
file_name_template: "{{ .ProjectName }}-{{ .Version }}-{{.Release}}.{{ .Arch }}"
formats:
- deb
- rpm

brews:
- tap:
owner: jmainguy
name: homebrew-tap
folder: Formula
homepage: https://github.com/Jmainguy/ghreport
description: "Check Github for Pull Requests, that are not Drafts, in repos the user cares about."
license: "GPL-2.0"
commit_author:
name: Jonathan Mainguy
email: [email protected]
test: |
system "#{bin}/ghreport"
install: |
bin.install "ghreport"
checksum:
name_template: 'checksums.txt'

changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
Loading

0 comments on commit 17b0512

Please sign in to comment.