Skip to content

Commit

Permalink
Merge pull request #3094 from mjudeikis/mjudeikis/krew.build
Browse files Browse the repository at this point in the history
✨ add krew index build
  • Loading branch information
kcp-ci-bot authored Mar 25, 2024
2 parents 35584e0 + ac24a57 commit 253afac
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
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

0 comments on commit 253afac

Please sign in to comment.