Skip to content

Commit 99c5b87

Browse files
committed
small fixes
1 parent 4b07589 commit 99c5b87

File tree

3 files changed

+11
-51
lines changed

3 files changed

+11
-51
lines changed

.github/workflows/plugin.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,12 @@ jobs:
3434
env:
3535
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3636

37-
- name: Set GORELEASER_CURRENT_TAG
37+
- name: Set a SemVer tag for goreleaser
3838
if: ${{ startsWith(github.ref, 'refs/tags/controller-') }}
3939
run: echo "GORELEASER_CURRENT_TAG=${{ github.ref }}" | sed 's/refs\/tags\/controller-//' >> $GITHUB_ENV
4040

41-
- name: Create local SemVer tag
41+
# GoReleaser requires a SemVer tag to be present in the git repository
42+
- name: Create a local SemVer tag
4243
run: git tag "${{ env.GORELEASER_CURRENT_TAG }}"
4344

4445
- name: Run GoReleaser
@@ -52,6 +53,7 @@ jobs:
5253
GORELEASER_CURRENT_TAG: ${{ env.GORELEASER_CURRENT_TAG }}
5354

5455
- name: Upload artifacts to release
56+
if: ${{ startsWith(github.ref, 'refs/tags/controller-') }}
5557
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
5658
with:
5759
files: |

.goreleaser.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
version: 2
22

33
project_name: ingress-nginx
4+
45
release:
6+
# Disable uploading release assets to GitHub as it requires SemVer tags
57
disable: true
8+
69
builds:
710
- id: ingress-nginx
811
goos:
@@ -20,14 +23,16 @@ builds:
2023
ldflags: |
2124
-s -w
2225
-X k8s.io/ingress-nginx/version.COMMIT={{ .Commit }}
23-
-X k8s.io/ingress-nginx/version.RELEASE=controller-{{ .Tag }}
26+
-X k8s.io/ingress-nginx/version.RELEASE={{ .Tag }}
27+
2428
archives:
2529
- id: ingress-nginx
2630
ids:
2731
- ingress-nginx
2832
name_template: "kubectl-{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
2933
formats:
3034
- tar.gz
35+
3136
checksum:
3237
name_template: "kubectl-{{ .ProjectName }}_checksums.txt"
3338

@@ -36,4 +41,4 @@ krews:
3641
homepage: "https://kubernetes.github.io/ingress-nginx/kubectl-plugin/"
3742
description: "The official kubectl plugin for ingress-nginx."
3843
short_description: "Interact with ingress-nginx"
39-
url_template: "http://github.com/alexintech/ingress-nginx/releases/download/controller-{{ .Tag }}/{{ .ArtifactName }}"
44+
url_template: "http://github.com/kubernetes/ingress-nginx/releases/download/controller-{{ .Tag }}/{{ .ArtifactName }}"

cmd/plugin/krew.yaml

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)