Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ on:
push:
tags:
- 'v*'
- '!v*-*' # Exclude prerelease tags like v1.0.1-beta, v1.0.1-alpha, etc.

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false # Don't cancel releases
cancel-in-progress: false

jobs:
goreleaser:
Expand All @@ -34,14 +33,16 @@ jobs:
version: "v1.x" # Binary version to install
args: release --clean --config deploy/.goreleaser.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.HOMEBREW_GITHUB_TOKEN }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Prerelease Tags Trigger Unintended Workflow

Removing the prerelease tag exclusion pattern causes the release workflow to trigger for prerelease tags. This results in GoReleaser publishing prerelease versions to Homebrew, which is likely unintended given that Krew updates are conditionally skipped for prereleases.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is intentional for now

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: GoReleaser Fails Without Default GitHub Token

The goreleaser job now uses secrets.HOMEBREW_GITHUB_TOKEN instead of the default secrets.GITHUB_TOKEN. GoReleaser relies on the default token's automatic permissions to create releases in the current repository. Without these permissions, the release workflow fails.

Fix in Cursor Fix in Web

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, this is as designed


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

- name: Update new support-bundle version in krew-index
if: ${{ !contains(github.ref_name, '-') }}
uses: rajatjindal/krew-release-bot@v0.0.47
with:
krew_template_file: deploy/krew/support-bundle.yaml
77 changes: 32 additions & 45 deletions deploy/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,6 @@ builds:
flags: -tags netgo -tags containers_image_ostree_stub -tags exclude_graphdriver_devicemapper -tags exclude_graphdriver_btrfs -tags containers_image_openpgp -installsuffix netgo
binary: support-bundle
hooks: {}
- id: collect
goos:
- linux
- darwin
goarch:
- amd64
- arm
- arm64
- riscv64
ignore:
- goos: windows
goarch: arm
env:
- CGO_ENABLED=0
main: cmd/collect/main.go
ldflags: -s -w
-X github.com/replicatedhq/troubleshoot/pkg/version.version={{.Version}}
-X github.com/replicatedhq/troubleshoot/pkg/version.gitSHA={{.Commit}}
-X github.com/replicatedhq/troubleshoot/pkg/version.buildTime={{.Date}}
-extldflags "-static"
flags: -tags netgo -tags containers_image_ostree_stub -tags exclude_graphdriver_devicemapper -tags exclude_graphdriver_btrfs -tags containers_image_openpgp -installsuffix netgo
binary: collect
hooks: {}
archives:
- id: preflight
builds:
Expand Down Expand Up @@ -112,26 +89,6 @@ archives:
- src: 'sbom/assets/*'
dst: .
strip_parent: true # this is needed to make up for the way unzips work in krew v0.4.1
- id: collect
builds:
- collect
format: tar.gz
format_overrides:
- goos: windows
format: zip
name_template: 'collect_{{ .Os }}_{{ .Arch }}'
files:
- licence*
- LICENCE*
- license*
- LICENSE*
- readme*
- README*
- changelog*
- CHANGELOG*
- src: 'sbom/assets/*'
dst: .
strip_parent: true # this is needed to make up for the way unzips work in krew v0.4.1
dockers:
- dockerfile: ./deploy/Dockerfile.troubleshoot
image_templates:
Expand All @@ -142,7 +99,6 @@ dockers:
ids:
- support-bundle
- preflight
- collect
- dockerfile: ./deploy/Dockerfile.troubleshoot
image_templates:
- "replicated/preflight:latest"
Expand All @@ -152,4 +108,35 @@ dockers:
ids:
- support-bundle
- preflight
- collect
universal_binaries:
- ids:
- preflight
replace: true
name_template: preflight
- ids:
- support-bundle
replace: true
name_template: support-bundle
brews:
- name: preflight
ids:
- preflight
homepage: https://docs.replicated.com/reference/preflight-overview/
description: "A preflight checker and conformance test for Kubernetes clusters."
repository:
name: homebrew-replicated
owner: replicatedhq
branch: main
install: bin.install "preflight"
directory: HomebrewFormula
- name: support-bundle
ids:
- support-bundle
homepage: https://docs.replicated.com/reference/support-bundle-overview/
description: "Collect and redact support bundles for Kubernetes clusters."
repository:
name: homebrew-replicated
owner: replicatedhq
branch: main
install: bin.install "support-bundle"
directory: HomebrewFormula

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: collect Binary Removal Causes Workflow Failures

The collect binary, including its build definition, archive configuration, and Docker image references, was removed from the release process. This appears to be an unintentional deletion, as the PR description focuses on adding Homebrew releases and doesn't mention deprecating collect. This change breaks existing workflows and Docker images that rely on the collect binary.

Fix in Cursor Fix in Web

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was intentional