@@ -10,6 +10,7 @@ permissions:
10
10
jobs :
11
11
release-plugin :
12
12
runs-on : ubuntu-latest
13
+ if : ${{ startsWith(github.ref, 'refs/tags/controller-') }}
13
14
steps :
14
15
- name : Checkout
15
16
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -25,25 +26,14 @@ jobs:
25
26
go-version : ${{ env.GOLANG_VERSION }}
26
27
check-latest : true
27
28
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
-
37
29
- name : Set a SemVer tag for goreleaser
38
- if : ${{ startsWith(github.ref, 'refs/tags/controller-') }}
39
30
run : echo "GORELEASER_CURRENT_TAG=${{ github.ref }}" | sed 's/refs\/tags\/controller-//' >> $GITHUB_ENV
40
31
41
32
# GoReleaser requires a SemVer tag to be present in the git repository
42
33
- name : Create a local SemVer tag
43
34
run : git tag "${{ env.GORELEASER_CURRENT_TAG }}"
44
35
45
36
- name : Run GoReleaser
46
- if : ${{ startsWith(github.ref, 'refs/tags/controller-') }}
47
37
uses : goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
48
38
with :
49
39
version : " ~> v2"
53
43
GORELEASER_CURRENT_TAG : ${{ env.GORELEASER_CURRENT_TAG }}
54
44
55
45
- name : Upload artifacts to release
56
- if : ${{ startsWith(github.ref, 'refs/tags/controller-') }}
57
46
uses : softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
58
47
with :
59
48
files : |
62
51
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
63
52
64
53
- name : Update new version in krew-index
65
- if : ${{ startsWith(github.ref, 'refs/tags/controller-') }}
66
54
uses : rajatjindal/krew-release-bot@3d9faef30a82761d610544f62afddca00993eef9 # v0.0.47
67
55
with :
68
56
krew_template_file : dist/krew/ingress-nginx.yaml
0 commit comments