Skip to content

Commit 7a14850

Browse files
committed
cleanup github workflow
1 parent 99c5b87 commit 7a14850

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

.github/workflows/plugin.yaml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ permissions:
1010
jobs:
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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -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@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.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@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
4838
with:
4939
version: "~> v2"
@@ -53,7 +43,6 @@ jobs:
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: |
@@ -62,7 +51,6 @@ jobs:
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

Comments
 (0)