Skip to content

Commit ba84475

Browse files
authored
Merge pull request #7 from bayashi/releaser
Releaser
2 parents d19e50f + 25b9e61 commit ba84475

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed

.github/workflows/releaser.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: releaser
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
jobs:
8+
goreleaser:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
- name: Set up Go
16+
uses: actions/setup-go@v5
17+
with:
18+
go-version-file: "./go.mod"
19+
cache-dependency-path: "./go.sum"
20+
- name: Run GoReleaser
21+
uses: goreleaser/goreleaser-action@v5
22+
with:
23+
version: latest
24+
args: release --clean
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}

.goreleaser.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
builds:
2+
- env:
3+
- CGO_ENABLED=0
4+
id: "irir"
5+
binary: irir
6+
goos:
7+
- linux
8+
- darwin
9+
ldflags: -s -w -X main.version={{.Version}} -X "main.installFrom=Binary"
10+
changelog:
11+
use: github
12+
filters:
13+
exclude:
14+
- Merge pull request
15+
- Merge remote-tracking branch
16+
- Merge branch
17+
brews:
18+
- tap:
19+
owner: bayashi
20+
name: homebrew-tap
21+
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
22+
folder: Formula
23+
homepage: https://github.com/bayashi/highlightrepo
24+
description: highlightrepo provides a filter to highlight repository directory in a path string.
25+
test: |
26+
system "#{bin}/highlightrepo", '--version'

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,21 @@ PS1="[\u@\h \$(pwd | highlightrepo -y)]\n\$ "
3030

3131
## Installation
3232

33+
### Mac
34+
35+
```sh
36+
brew tap bayashi/tap
37+
brew install bayashi/tap/highlightrepo
38+
```
39+
40+
### Binary install
41+
42+
Download binary from here: https://github.com/bayashi/highlightrepo/releases
43+
44+
### Go manual
45+
46+
If you have golang environment:
47+
3348
```cmd
3449
go install github.com/bayashi/highlightrepo@latest
3550
```

0 commit comments

Comments
 (0)