Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ add krew index build #3094

Merged
merged 5 commits into from
Mar 25, 2024
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
2 changes: 2 additions & 0 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
args: release --timeout 60m
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KREW_GITHUB_TOKEN: ${{ secrets.KREW_GITHUB_TOKEN }}
- name: Run GoReleaser on pull request
if: github.event_name == 'pull_request'
uses: goreleaser/goreleaser-action@v4
Expand All @@ -45,6 +46,7 @@ jobs:
args: release --timeout 60m --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KREW_GITHUB_TOKEN: ${{ secrets.KREW_GITHUB_TOKEN }}
- uses: cytopia/[email protected]
if: ${{ always() }}
with:
Expand Down
22 changes: 22 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

builds:
- id: "kcp"
main: ./cmd/kcp
Expand Down Expand Up @@ -74,7 +75,28 @@ archives:
files:
- bin/kubectl-workspaces
- bin/kubectl-ws
# krew has separate archive as it supports only one binary per plugin
- id: kubectl-kcp-plugin-krew
builds:
- kubectl-workspace
name_template: "kubectl-kcp-ws-plugin_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- bin/kubectl-ws
release:
draft: true
prerelease: auto
mode: keep-existing

krews:
- name: ws
ids:
- kubectl-kcp-plugin-krew
repository:
owner: kcp-dev
name: krew-index
token: "{{ .Env.KREW_GITHUB_TOKEN }}"
homepage: "https://kcp.io/"
description: |
KCP workspace cli plugin for kubectl. Enables you to manage your kcp workspaces.
short_description: "KCP workspace cli plugin for kubectl."
skip_upload: auto
Loading