Skip to content

Commit

Permalink
GitHub Action and release automation
Browse files Browse the repository at this point in the history
* Support for automated krew-plugin release
* Support for automated homebrew release
  • Loading branch information
vladimirvivien committed Jun 11, 2022
1 parent 3f12e8f commit 80d510b
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 16 deletions.
31 changes: 15 additions & 16 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,18 @@ jobs:
name: goreleaser-release
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@master
-
name: Set up Go
uses: actions/setup-go@master
with:
go-version: 1.17.5
-
name: Binary release
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@master
- name: Set up Go
uses: actions/setup-go@master
with:
go-version: 1.18
- name: Binary release
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.RELEASER_SECRET }}
- name: Update new version in krew-index
uses: rajatjindal/[email protected]
18 changes: 18 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ archives:

checksum:
name_template: 'checksums.txt'

# kubectl krew plugin
krews:
-
ids:
Expand All @@ -77,3 +79,19 @@ krews:
* By default, ktop displays metrics for resources in the default namespace. You can override this behavior
by providing a --namespace or use -A for all namespaces.
skip_upload: true

# Homebrew
brews:
- name: ktop
ids:
- ktop
tap:
owner: vladimirvivien
name: homebrew-oss-tools
commit_author:
name: vladimirvivien
email: [email protected]
homepage: https://github.com/vladimirvivien/ktop
description: A top-like tool to display kubernetes workload metrics
license: "Apache-2.0 license"
skip_upload: auto
39 changes: 39 additions & 0 deletions .krew.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apiVersion: krew.googlecontainertools.github.com/v1alpha2
kind: Plugin
metadata:
name: ktop
spec:
version: {{ .TagName }}
platforms:
- bin: kubectl-ktop
{{addURIAndSha "https://github.com/vladimirvivien/ktop/releases/download/{{ .TagName }}/kubectl-ktop_{{ .TagName }}_linux_arm64.tar.gz" .TagName | indent 6 }}
selector:
matchLabels:
os: linux
arch: arm64
- bin: kubectl-ktop
{{addURIAndSha "https://github.com/vladimirvivien/ktop/releases/download/{{ .TagName }}/kubectl-ktop_{{ .TagName }}_linux_amd64.tar.gz" .TagName | indent 6 }}
selector:
matchLabels:
os: linux
arch: amd64
- bin: kubectl-ktop
{{addURIAndSha "https://github.com/vladimirvivien/ktop/releases/download/{{ .TagName }}/kubectl-ktop_{{ .TagName }}_darwin_arm64.tar.gz" .TagName | indent 6 }}
selector:
matchLabels:
os: darwin
arch: arm64
- bin: kubectl-ktop
{{addURIAndSha "https://github.com/vladimirvivien/ktop/releases/download/{{ .TagName }}/kubectl-ktop_{{ .TagName }}_darwin_amd64.tar.gz" .TagName | indent 6 }}
selector:
matchLabels:
os: darwin
arch: amd64
shortDescription: A top tool to display workload metrics
homepage: https://github.com/vladimirvivien/ktop
caveats: |
* By default, ktop displays metrics for resources in the default namespace. You can override this behavior
by providing a --namespace or use -A for all namespaces.
description: |
This is a kubectl plugin for ktop, a top-like tool for displaying workload
metrics for a running Kubernetes cluster.

0 comments on commit 80d510b

Please sign in to comment.