39 lines
1,018 B
YAML
39 lines
1,018 B
YAML
name: kubectl plugin
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
tags:
|
|
- 'v*.*.*\+plugin'
|
|
|
|
permissions:
|
|
contents: write # for goreleaser/goreleaser-action
|
|
|
|
jobs:
|
|
release-plugin:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
|
|
with:
|
|
go-version: '1.21.1'
|
|
check-latest: true
|
|
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@3fa32b8bb5620a2c1afe798654bbad59f9da4906 # v4.4.0
|
|
with:
|
|
version: latest
|
|
args: release --clean
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Update new version in krew-index
|
|
uses: rajatjindal/krew-release-bot@df3eb197549e3568be8b4767eec31c5e8e8e6ad8 # v0.0.46
|
|
with:
|
|
krew_template_file: cmd/plugin/krew.yaml
|