Skip to content

Commit 6b7fd38

Browse files
authored
Support homebrew tap (#24)
* Format YAML * Update config files to support for homebrew-tap * Update readme
1 parent 63b4de0 commit 6b7fd38

File tree

3 files changed

+39
-29
lines changed

3 files changed

+39
-29
lines changed

.github/workflows/release.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release
33
on:
44
push:
55
tags:
6-
- '*'
6+
- "*"
77

88
permissions:
99
contents: write
@@ -12,22 +12,20 @@ jobs:
1212
goreleaser:
1313
runs-on: ubuntu-latest
1414
steps:
15-
-
16-
name: Checkout
15+
- name: Checkout
1716
uses: actions/checkout@v2
1817
with:
1918
fetch-depth: 0
20-
-
21-
name: Set up Go
19+
- name: Set up Go
2220
uses: actions/setup-go@v2
2321
with:
2422
go-version: 1.17
25-
-
26-
name: Build release artifacts
23+
- name: Build release artifacts
2724
uses: goreleaser/goreleaser-action@v2
2825
with:
2926
distribution: goreleaser
3027
version: latest
3128
args: release --rm-dist
3229
env:
3330
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
project_name: revealgo
22
before:
33
hooks:
4-
- git submodule update --init --recursive
4+
- git submodule update --init --recursive
55
build:
66
binary: revealgo
77
main: cmd/revealgo/reveal.go
88
ldflags:
9-
- -s -w -X github.com/yusukebe/revealgo.Version=v{{.Version}}
9+
- -s -w -X github.com/yusukebe/revealgo.Version=v{{.Version}}
1010
goos:
1111
- darwin
1212
- linux
@@ -22,23 +22,33 @@ build:
2222
env:
2323
- CGO_ENABLED=0
2424
archives:
25-
- name_template: "{{.Binary}}_{{ .Version }}_{{.Os}}-{{.Arch}}"
26-
replacements:
27-
amd64: 64bit
28-
386: 32bit
29-
arm: ARM
30-
arm64: ARM64
31-
darwin: macOS
32-
linux: Linux
33-
windows: Windows
34-
format: tar.gz
35-
format_overrides:
36-
- goos: windows
37-
format: zip
38-
files:
39-
- LICENSE
25+
- name_template: "{{.Binary}}_{{ .Version }}_{{.Os}}-{{.Arch}}"
26+
replacements:
27+
amd64: 64bit
28+
386: 32bit
29+
arm: ARM
30+
arm64: ARM64
31+
darwin: macOS
32+
linux: Linux
33+
windows: Windows
34+
format: tar.gz
35+
format_overrides:
36+
- goos: windows
37+
format: zip
38+
files:
39+
- LICENSE
4040
snapshot:
4141
name_template: SNAPSHOT-{{ .Commit }}
4242
release:
4343
draft: true
4444
prerelease: auto
45+
brews:
46+
- tap:
47+
owner: yusukebe
48+
name: homebrew-tap
49+
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
50+
folder: Formula
51+
name: "revealgo"
52+
homepage: "https://github.com/yusukebe/revealgo"
53+
description: "Markdown driven presentation tool written in Go!"
54+
license: "MIT"

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66

77
### Binary
88

9-
Download the binary from [**GitHub Releases**](https://github.com/yusukebe/revealgo/releases) and install it somewhere in your `$PATH`.
9+
Download the binary from [**GitHub Releases**](https://github.com/yusukebe/revealgo/releases) and install it somewhere in your `$PATH`. `revealgo` currently provides pre-built binaries for Linux, macOS and Windows.
1010

11-
`revealgo` currently provides pre-built binaries for the following:
11+
### Homebrew
1212

13-
- macOS / Darwin
14-
- Windows
15-
- Linux
13+
You can also install via [hombrew](https://brew.sh) on macOS:
14+
15+
```
16+
$ brew install yusukebe/tap/revealgo
17+
```
1618

1719
### Source
1820

0 commit comments

Comments
 (0)