Skip to content

Commit fc9e8a4

Browse files
committed
adding brew
1 parent 91db72b commit fc9e8a4

2 files changed

Lines changed: 36 additions & 48 deletions

File tree

.github/workflows/release.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ on:
44
push:
55
tags:
66
- 'v*'
7-
- '!v*-*' # Exclude prerelease tags like v1.0.1-beta, v1.0.1-alpha, etc.
87

98
concurrency:
109
group: ${{ github.workflow }}-${{ github.ref }}
11-
cancel-in-progress: false # Don't cancel releases
10+
cancel-in-progress: false
1211

1312
jobs:
1413
goreleaser:
@@ -34,14 +33,16 @@ jobs:
3433
version: "v1.x" # Binary version to install
3534
args: release --clean --config deploy/.goreleaser.yaml
3635
env:
37-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
GITHUB_TOKEN: ${{ secrets.HOMEBREW_GITHUB_TOKEN }}
3837

3938
- name: Update new preflight version in krew-index
39+
if: ${{ !contains(github.ref_name, '-') }}
4040
uses: rajatjindal/krew-release-bot@v0.0.47
4141
with:
4242
krew_template_file: deploy/krew/preflight.yaml
4343

4444
- name: Update new support-bundle version in krew-index
45+
if: ${{ !contains(github.ref_name, '-') }}
4546
uses: rajatjindal/krew-release-bot@v0.0.47
4647
with:
4748
krew_template_file: deploy/krew/support-bundle.yaml

deploy/.goreleaser.yaml

Lines changed: 32 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -48,29 +48,6 @@ builds:
4848
flags: -tags netgo -tags containers_image_ostree_stub -tags exclude_graphdriver_devicemapper -tags exclude_graphdriver_btrfs -tags containers_image_openpgp -installsuffix netgo
4949
binary: support-bundle
5050
hooks: {}
51-
- id: collect
52-
goos:
53-
- linux
54-
- darwin
55-
goarch:
56-
- amd64
57-
- arm
58-
- arm64
59-
- riscv64
60-
ignore:
61-
- goos: windows
62-
goarch: arm
63-
env:
64-
- CGO_ENABLED=0
65-
main: cmd/collect/main.go
66-
ldflags: -s -w
67-
-X github.com/replicatedhq/troubleshoot/pkg/version.version={{.Version}}
68-
-X github.com/replicatedhq/troubleshoot/pkg/version.gitSHA={{.Commit}}
69-
-X github.com/replicatedhq/troubleshoot/pkg/version.buildTime={{.Date}}
70-
-extldflags "-static"
71-
flags: -tags netgo -tags containers_image_ostree_stub -tags exclude_graphdriver_devicemapper -tags exclude_graphdriver_btrfs -tags containers_image_openpgp -installsuffix netgo
72-
binary: collect
73-
hooks: {}
7451
archives:
7552
- id: preflight
7653
builds:
@@ -112,26 +89,6 @@ archives:
11289
- src: 'sbom/assets/*'
11390
dst: .
11491
strip_parent: true # this is needed to make up for the way unzips work in krew v0.4.1
115-
- id: collect
116-
builds:
117-
- collect
118-
format: tar.gz
119-
format_overrides:
120-
- goos: windows
121-
format: zip
122-
name_template: 'collect_{{ .Os }}_{{ .Arch }}'
123-
files:
124-
- licence*
125-
- LICENCE*
126-
- license*
127-
- LICENSE*
128-
- readme*
129-
- README*
130-
- changelog*
131-
- CHANGELOG*
132-
- src: 'sbom/assets/*'
133-
dst: .
134-
strip_parent: true # this is needed to make up for the way unzips work in krew v0.4.1
13592
dockers:
13693
- dockerfile: ./deploy/Dockerfile.troubleshoot
13794
image_templates:
@@ -142,7 +99,6 @@ dockers:
14299
ids:
143100
- support-bundle
144101
- preflight
145-
- collect
146102
- dockerfile: ./deploy/Dockerfile.troubleshoot
147103
image_templates:
148104
- "replicated/preflight:latest"
@@ -152,4 +108,35 @@ dockers:
152108
ids:
153109
- support-bundle
154110
- preflight
155-
- collect
111+
universal_binaries:
112+
- ids:
113+
- preflight
114+
replace: true
115+
name_template: preflight
116+
- ids:
117+
- support-bundle
118+
replace: true
119+
name_template: support-bundle
120+
brews:
121+
- name: preflight
122+
ids:
123+
- preflight
124+
homepage: https://docs.replicated.com/reference/preflight-overview/
125+
description: "A preflight checker and conformance test for Kubernetes clusters."
126+
repository:
127+
name: homebrew-replicated
128+
owner: replicatedhq
129+
branch: main
130+
install: bin.install "preflight"
131+
directory: HomebrewFormula
132+
- name: support-bundle
133+
ids:
134+
- support-bundle
135+
homepage: https://docs.replicated.com/reference/support-bundle-overview/
136+
description: "Collect and redact support bundles for Kubernetes clusters."
137+
repository:
138+
name: homebrew-replicated
139+
owner: replicatedhq
140+
branch: main
141+
install: bin.install "support-bundle"
142+
directory: HomebrewFormula

0 commit comments

Comments
 (0)