Skip to content
This repository has been archived by the owner on Jul 30, 2023. It is now read-only.

Commit

Permalink
Merge pull request #35 from rothgar/goreleaser
Browse files Browse the repository at this point in the history
Add Goreleaser support for releases and homebrew
  • Loading branch information
Hidetatsu Yaginuma committed Nov 17, 2020
2 parents de74e2b + 1e64fa6 commit dc3c55d
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: goreleaser

on:
push:
tags:
- '*'

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13.x
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GO_RELEASER }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/
51 changes: 51 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
release:

before:
hooks:
- go mod tidy
- make testshort

builds:
- id: kubecolor
main: ./cmd/kubecolor/main.go
binary: kubecolor
goos:
- windows
- darwin
- linux
goarch:
- amd64

archives:
- builds:
- kubecolor
replacements:
darwin: Darwin
linux: Linux
windows: Windows
amd64: x86_64
format: tar.gz
format_overrides:
- goos: windows
format: zip

brews:
- name: kubecolor
tap:
owner: dty1er
name: homebrew-tap
homepage: "https://github.com/dty1er/kubecolor"
description: "Colorize your kubectl output"
folder: Formula
install: |
bin.install "kubecolor"
checksum:
name_template: 'checksums.txt'

changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ Additionally, if `kubectl` resulted an error, kubecolor just shows the error mes

## Installation

### Mac and Linux users via Homebrew

```sh
brew install dty1er/tap/kubecolor
```

### Manually via go get

```sh
go get -u github.com/dty1er/kubecolor/cmd/kubecolor
```
Expand Down

0 comments on commit dc3c55d

Please sign in to comment.