Skip to content

Commit fa84fdc

Browse files
authored
ci: add brew release (#78)
1 parent 474b8ad commit fa84fdc

File tree

2 files changed

+46
-26
lines changed

2 files changed

+46
-26
lines changed

.github/workflows/release.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Set up Go
1717
uses: actions/setup-go@v2
1818
with:
19-
go-version: '1.15'
19+
go-version: "1.15"
2020
- name: Login to DockerHub
2121
uses: docker/login-action@v1
2222
with:
@@ -30,4 +30,4 @@ jobs:
3030
version: latest
3131
args: --rm-dist
3232
env:
33-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
GITHUB_TOKEN: ${{ secrets.GO_RELEASER_TOKEN }}

.goreleaser.yaml

+44-24
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
project_name: guardian
22

3+
release:
4+
draft: true
5+
prerelease: auto
6+
7+
before:
8+
hooks:
9+
- go mod tidy
10+
- make clean
11+
312
builds:
413
- main: ./main.go
514
id: "guardian"
@@ -8,17 +17,11 @@ builds:
817
- -a
918
ldflags:
1019
- -s -w -X github.com/odpf/guardian/main.Version={{.Tag}} -X github.com/odpf/guardian/main.BuildCommit={{.FullCommit}} -X github.com/odpf/guardian/main.BuildDate={{.Date}}
11-
goos:
12-
- linux
13-
- darwin
14-
- windows
15-
goarch:
16-
- amd64
17-
- 386
18-
- arm
19-
- arm64
20+
goos: [darwin, linux, windows]
21+
goarch: [amd64, 386, arm, arm64]
2022
env:
2123
- CGO_ENABLED=0
24+
2225
archives:
2326
- replacements:
2427
darwin: macos
@@ -29,28 +32,45 @@ archives:
2932
format_overrides:
3033
- goos: windows
3134
format: zip
32-
release:
33-
draft: true
34-
prerelease: auto
35-
checksum:
36-
name_template: 'checksums.txt'
37-
snapshot:
38-
name_template: "{{ .Tag }}-next"
35+
3936
changelog:
4037
sort: asc
4138
filters:
4239
exclude:
43-
- '^docs:'
44-
- '^test:'
45-
- '^build:'
40+
- "^docs:"
41+
- "^test:"
42+
- "^build:"
43+
44+
checksum:
45+
name_template: "checksums.txt"
46+
47+
snapshot:
48+
name_template: "{{ .Tag }}-next"
49+
4650
dockers:
47-
-
48-
goos: linux
51+
- goos: linux
4952
goarch: amd64
5053
ids:
5154
- guardian
5255
dockerfile: Dockerfile
5356
image_templates:
54-
- 'docker.io/odpf/{{.ProjectName}}:latest'
55-
- 'docker.io/odpf/{{.ProjectName}}:{{ .Version }}'
56-
- 'docker.io/odpf/{{.ProjectName}}:{{ .Tag }}-amd64'
57+
- "docker.io/odpf/{{.ProjectName}}:latest"
58+
- "docker.io/odpf/{{.ProjectName}}:{{ .Version }}"
59+
- "docker.io/odpf/{{.ProjectName}}:{{ .Tag }}-amd64"
60+
61+
brews:
62+
- name: guardian
63+
homepage: "https://github.com/odpf/guardian"
64+
description: "Metadata collection tool."
65+
tap:
66+
owner: odpf
67+
name: homebrew-taps
68+
license: "Apache 2.0"
69+
folder: Formula
70+
dependencies:
71+
- name: git
72+
install: |-
73+
bin.install "guardian"
74+
commit_author:
75+
name: Ravi Suhag
76+

0 commit comments

Comments
 (0)