-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
225 additions
and
14 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,37 @@ | ||
name: Feature_CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- feature/* | ||
pull_request: | ||
branches: | ||
- feature/* | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.18 | ||
|
||
- name: Build | ||
run: go build -v ./... | ||
|
||
- name: Test | ||
run: go test -v ./... | ||
|
||
- name: Tags | ||
run: | | ||
git fetch --prune --unshallow | ||
git describe --tags | ||
CURV=$(git describe --tags --abbrev=0) | ||
IFS='.' read -ra VR <<< "$CURV" | ||
INC=`expr ${VR[2]} + 1` | ||
FV="${VR[0]}.${VR[1]}.$INC" | ||
shell: bash |
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,80 @@ | ||
name: Go | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.18 | ||
|
||
# - name: Install dependencies | ||
# run: | | ||
# go version | ||
# go get -u golang.org/x/lint/golint | ||
|
||
- name: Build | ||
run: go build -v ./... | ||
|
||
# - name: Test With Coverage | ||
# run: go test -v -coverprofile=coverage.txt -covermode=atomic ./... | ||
|
||
# - name: Upload coverage to Codecov | ||
# run: bash <(curl -s https://codecov.io/bash) | ||
|
||
tag: | ||
needs: ci | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set env | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.18 | ||
|
||
- name: Tag and Deploy | ||
run: | | ||
git fetch --prune --unshallow | ||
CURV=$(git describe --tags --abbrev=0) | ||
IFS='.' read -ra VR <<< "$CURV" | ||
INC=`expr ${VR[2]} + 1` | ||
FV="${VR[0]}.${VR[1]}.$INC" | ||
eval "git tag $FV && git push origin $FV" | ||
eval "GOPROXY=proxy.golang.org go list -m github.com/aurc/loggo@$FV" | ||
shell: bash | ||
release: | ||
needs: tag | ||
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.18 | ||
- | ||
name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.HOMEBREW_LOGGO_GITHUB_TOKEN }} |
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 |
---|---|---|
|
@@ -8,6 +8,7 @@ main | |
.idea | ||
loggo | ||
testdata/log.txt | ||
dist/ | ||
# Test binary, built with `go test -c` | ||
*.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,64 @@ | ||
project_name: loggo | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
nfpms: | ||
- maintainer: Aurelio Calegari ([email protected]) | ||
description: Rich Terminal User Interface for JSON logs | ||
homepage: https://github.com/aurc/loggo | ||
license: MIT | ||
formats: | ||
- deb | ||
- rpm | ||
- apk | ||
brews: | ||
- | ||
name: loggo | ||
# GOARM to specify which 32-bit arm version to use if there are multiple versions | ||
# from the build section. Brew formulas support atm only one 32-bit version. | ||
# Default is 6 for all artifacts or each id if there a multiple versions. | ||
goarm: 6 | ||
|
||
tap: | ||
owner: aurc | ||
name: homebrew-loggo | ||
branch: main | ||
# # Optionally a token can be provided, if it differs from the token provided to GoReleaser | ||
# token: "{{ .Env.HOMEBREW_LOGGO_GITHUB_TOKEN }}" | ||
|
||
url_template: "https://github.com/aurc/loggo/releases/download/{{ .Tag }}/{{ .ArtifactName }}" | ||
|
||
commit_author: | ||
name: aurc_bot | ||
email: [email protected] | ||
|
||
# The project name and current git tag are used in the format string. | ||
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}" | ||
|
||
# Folder inside the repository to put the formula. | ||
# Default is the root folder. | ||
folder: Formula | ||
|
||
# Caveats for the user of your binary. | ||
# Default is empty. | ||
caveats: "How to use this binary" | ||
|
||
# Your app's homepage. | ||
# Default is empty. | ||
homepage: "https://github.com/aurc/homebrew-loggo" | ||
|
||
# Template of your app's description. | ||
# Default is empty. | ||
description: "Rich Terminal User Interface for JSON logs" | ||
|
||
# SPDX identifier of your app's license. | ||
# Default is empty. | ||
license: "MIT" | ||
|
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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