![dependabot[bot]](/assets/img/avatar_default.png)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
50 lines
1.5 KiB
YAML
50 lines
1.5 KiB
YAML
name: kubectl plugin
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
permissions:
|
|
contents: write # for goreleaser/goreleaser-action
|
|
|
|
jobs:
|
|
release-plugin:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Get go version
|
|
run: echo "GOLANG_VERSION=$(cat GOLANG_VERSION)" >> $GITHUB_ENV
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
|
|
with:
|
|
go-version: ${{ env.GOLANG_VERSION }}
|
|
check-latest: true
|
|
|
|
- name: Run GoReleaser Snapshot
|
|
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
|
|
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
|
|
with:
|
|
version: latest
|
|
args: release --snapshot --clean
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Run GoReleaser
|
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
|
|
with:
|
|
version: latest
|
|
args: release --clean
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Update new version in krew-index
|
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
uses: rajatjindal/krew-release-bot@df3eb197549e3568be8b4767eec31c5e8e8e6ad8 # v0.0.46
|
|
with:
|
|
krew_template_file: cmd/plugin/krew.yaml
|