Skip to content

Commit 1b1ae0c

Browse files
authored
feat: support for pkg manager brew (#126)
1 parent 055d7dc commit 1b1ae0c

File tree

3 files changed

+137
-1
lines changed

3 files changed

+137
-1
lines changed

.github/workflows/release.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "Release"
2+
on:
3+
push:
4+
tags:
5+
- v*
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
env:
11+
GO_VERSION: '1.23'
12+
steps:
13+
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- uses: actions/setup-go@v5
19+
with:
20+
go-version: ${{ env.GO_VERSION }}
21+
22+
- name: Create release
23+
uses: goreleaser/goreleaser-action@v6
24+
with:
25+
version: latest
26+
args: release --clean --timeout=90m
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ bin
55
easyp
66
coverage.out
77
easyp.lock
8-
.DS_Store
8+
.DS_Store
9+
dist/

.goreleaser.yaml

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
version: 2
2+
3+
project_name: easyp
4+
5+
builds:
6+
- binary: easyp
7+
main: ./cmd/easyp/
8+
flags:
9+
- -trimpath
10+
env:
11+
- CGO_ENABLED=0
12+
goos:
13+
- darwin
14+
- windows
15+
- linux
16+
- freebsd
17+
- netbsd
18+
- illumos
19+
goarch:
20+
- amd64
21+
- arm64
22+
- arm
23+
- 386
24+
- ppc64le
25+
- s390x
26+
- mips64
27+
- mips64le
28+
- riscv64
29+
- loong64
30+
goarm:
31+
- 6
32+
- 7
33+
gomips:
34+
- hardfloat
35+
ignore:
36+
- goos: darwin
37+
goarch: 386
38+
- goos: freebsd
39+
goarch: arm64
40+
41+
archives:
42+
- format: tar.gz
43+
wrap_in_directory: true
44+
format_overrides:
45+
- goos: windows
46+
format: zip
47+
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
48+
files:
49+
- LICENSE
50+
- README.md
51+
52+
snapshot:
53+
version_template: SNAPSHOT-{{ .Commit }}
54+
55+
checksum:
56+
disable: false
57+
name_template: '{{ .ProjectName }}-{{ .Version }}-checksums.txt'
58+
59+
changelog:
60+
sort: asc
61+
filters:
62+
exclude:
63+
- '(?i)^docs?:'
64+
- '(?i)^docs\([^:]+\):'
65+
- '(?i)^docs\[[^:]+\]:'
66+
- '^tests?:'
67+
- '(?i)^dev:'
68+
- '(?i)^chore:'
69+
- '^build\(deps\): bump .* in /docs \(#\d+\)'
70+
- '^build\(deps\): bump .* in /\.github/peril \(#\d+\)'
71+
- '^build\(deps\): bump .* in /scripts/gen_github_action_config \(#\d+\)'
72+
- Merge pull request
73+
- Merge branch
74+
75+
release:
76+
skip_upload: false
77+
github:
78+
owner: easyp-tech
79+
name: easyp
80+
header: |
81+
`easyp` is a free and open-source project built by volunteers.
82+
83+
source:
84+
enabled: true
85+
name_template: '{{ .ProjectName }}-{{ .Version }}-source'
86+
87+
brews:
88+
- description: Easy modern protobuf tooling for all your needs.
89+
homepage: https://easyp.tech
90+
skip_upload: false
91+
repository:
92+
owner: easyp-tech
93+
name: homebrew-tap
94+
commit_author:
95+
name: easyp-tech-releaser
96+
97+
directory: Formula
98+
install: |
99+
bin.install "easyp"
100+
output = Utils.popen_read("#{bin}/easyp completion bash")
101+
(bash_completion/"easyp").write output
102+
output = Utils.popen_read("#{bin}/easyp completion zsh")
103+
(zsh_completion/"_easyp").write output
104+
prefix.install_metafiles
105+
test: |
106+
system "#{bin}/easyp --version"

0 commit comments

Comments
 (0)