@@ -10,6 +10,7 @@ permissions:
1010jobs :
1111 release-plugin :
1212 runs-on : ubuntu-latest
13+ if : ${{ startsWith(github.ref, 'refs/tags/controller-') }}
1314 steps :
1415 - name : Checkout
1516 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -25,25 +26,14 @@ jobs:
2526 go-version : ${{ env.GOLANG_VERSION }}
2627 check-latest : true
2728
28- - name : Run GoReleaser Snapshot
29- if : ${{ ! startsWith(github.ref, 'refs/tags/') }}
30- uses : goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
31- with :
32- version : " ~> v2"
33- args : release --snapshot --clean
34- env :
35- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
36-
3729 - name : Set a SemVer tag for goreleaser
38- if : ${{ startsWith(github.ref, 'refs/tags/controller-') }}
3930 run : echo "GORELEASER_CURRENT_TAG=${{ github.ref }}" | sed 's/refs\/tags\/controller-//' >> $GITHUB_ENV
4031
4132 # GoReleaser requires a SemVer tag to be present in the git repository
4233 - name : Create a local SemVer tag
4334 run : git tag "${{ env.GORELEASER_CURRENT_TAG }}"
4435
4536 - name : Run GoReleaser
46- if : ${{ startsWith(github.ref, 'refs/tags/controller-') }}
4737 uses : goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
4838 with :
4939 version : " ~> v2"
5343 GORELEASER_CURRENT_TAG : ${{ env.GORELEASER_CURRENT_TAG }}
5444
5545 - name : Upload artifacts to release
56- if : ${{ startsWith(github.ref, 'refs/tags/controller-') }}
5746 uses : softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
5847 with :
5948 files : |
6251 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6352
6453 - name : Update new version in krew-index
65- if : ${{ startsWith(github.ref, 'refs/tags/controller-') }}
6654 uses : rajatjindal/krew-release-bot@3d9faef30a82761d610544f62afddca00993eef9 # v0.0.47
6755 with :
6856 krew_template_file : dist/krew/ingress-nginx.yaml
0 commit comments