
* Feat: reimplement kubectl plugin release system This commit does the following changes: - Add GitHub Actions pipeline for releasing the plugin - Removes the build/build-plugin.sh and replaces this with GoReleaser - Adds the use of krew-release-bot for automatically updating the krew release - Removes the make target for build/build-plugin.sh Signed-off-by: Ismayil Mirzali <ismayilmirzeli@gmail.com> * Fix: pin github actions stages with commit sha Signed-off-by: Ismayil Mirzali <ismayilmirzeli@gmail.com> Signed-off-by: Ismayil Mirzali <ismayilmirzeli@gmail.com>
37 lines
943 B
YAML
37 lines
943 B
YAML
name: kubectl plugin
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
paths:
|
|
- "cmd/plugin/**"
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
release-plugin:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923 # v3.2.0
|
|
with:
|
|
go-version: 1.18
|
|
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@68acf3b1adf004ac9c2f0a4259e85c5f66e99bef # v3.0.0
|
|
with:
|
|
version: latest
|
|
args: release --rm-dist
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Update new version in krew-index
|
|
uses: rajatjindal/krew-release-bot@92da038bbf995803124a8e50ebd438b2f37bbbb0 # v0.0.43
|
|
with:
|
|
krew_template_file: cmd/plugin/krew.yaml
|