diff --git a/.github/workflows/kubectl-plugin-release.yaml b/.github/workflows/kubectl-plugin-release.yaml new file mode 100644 index 00000000000..56c229a5e3c --- /dev/null +++ b/.github/workflows/kubectl-plugin-release.yaml @@ -0,0 +1,18 @@ +name: release-kubectl-plugin +on: + workflow_dispatch: + inputs: + tag: + description: 'Desired release version tag (e.g. v1.1.0-rc.1).' + required: true +jobs: + release-kubectl-plugin: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.tag }} + fetch-tags: 'true' + - name: Show tag + run: git show-ref --head --dereference | grep "$(git rev-parse HEAD)" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index 9313f43a5d9..00000000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,28 +0,0 @@ -name: release -on: - push: - tags: - - "v*.*.*" - workflow_dispatch: -jobs: - release-kubectl-plugin: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@master - - name: Setup Go - uses: actions/setup-go@v5 - with: - go-version: '1.22' - - name: GoReleaser - uses: goreleaser/goreleaser-action@v6 - with: - distribution: 'goreleaser' - version: latest - args: release --clean - workdir: 'kubectl-plugin' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # TODO(MortalHappiness): This won't work now. The first version of plugin has to be submitted manually by use to the krew-index repo, so I'll submit a PR to the krew-index repo once a release candidate is created. - - name: Update new version in krew-index - uses: rajatjindal/krew-release-bot@v0.0.46