7
7
concurrency : release-${{ github.event.release.tag_name }}
8
8
9
9
env :
10
+ HELM_VERSION : v3.11.3
10
11
REGCTL_VERSION : v0.4.8
11
12
REGISTRY : ghcr.io
12
13
CHART_DIRECTORY : chart
@@ -16,6 +17,21 @@ defaults:
16
17
shell : bash
17
18
18
19
jobs :
20
+ publish-go-module :
21
+ name : Publish go module
22
+ runs-on : ubuntu-24.04
23
+
24
+ steps :
25
+ - name : Trigger registration on sum.golang.org
26
+ run : |
27
+ repository=${{ github.repository }}
28
+ tag=${{ github.event.release.tag_name }}
29
+ curl -sSf \
30
+ --max-time 30 \
31
+ --retry 5 \
32
+ --retry-max-time 300 \
33
+ https://sum.golang.org/lookup/github.com/${repository,,}@${tag}
34
+
19
35
validate :
20
36
name : Run validations
21
37
runs-on : ubuntu-24.04
@@ -138,3 +154,36 @@ jobs:
138
154
repository=$REGISTRY/${{ github.repository }}/crds
139
155
tar cvz * | regctl artifact put -m application/gzip ${repository,,}:${{ github.event.release.tag_name }}
140
156
157
+ publish-chart :
158
+ name : Publish chart to github packages
159
+ runs-on : ubuntu-24.04
160
+ needs : validate
161
+ permissions :
162
+ contents : read
163
+ packages : write
164
+
165
+ steps :
166
+ - name : Checkout repository
167
+ uses : actions/checkout@v4
168
+
169
+ - uses : azure/setup-helm@v4
170
+ with :
171
+ version : ${{ env.HELM_VERSION }}
172
+
173
+ - name : Create package
174
+ run : |
175
+ chart_version=$(yq .version $CHART_DIRECTORY/Chart.yaml)
176
+ helm package --version $chart_version $CHART_DIRECTORY
177
+
178
+ - name : Login to the OCI registry
179
+ run : |
180
+ helm --registry-config $RUNNER_TEMP/helm-config.json registry login $REGISTRY -u ${{ github.actor }} --password-stdin <<< ${{ github.token }}
181
+
182
+ - name : Upload package
183
+ run : |
184
+ chart_name=$(yq .name $CHART_DIRECTORY/Chart.yaml)
185
+ chart_version=$(yq .version $CHART_DIRECTORY/Chart.yaml)
186
+ file=$chart_name-$chart_version.tgz
187
+ repository=$REGISTRY/${{ github.repository }}/charts
188
+ helm --registry-config $RUNNER_TEMP/helm-config.json push $file oci://${repository,,}
189
+
0 commit comments