@@ -218,6 +218,7 @@ jobs:
218
218
fi
219
219
220
220
- name : Generate manifest entry
221
+ if : startsWith(github.ref, 'refs/tags/v')
221
222
shell : bash
222
223
run : |
223
224
@@ -230,9 +231,12 @@ jobs:
230
231
SHA256=$(sha256sum cli/${{ matrix.platform }}/hasura-ndc-sqlserver | cut -d' ' -f1)
231
232
fi
232
233
234
+ # Extract tag from github.ref by removing 'refs/tags/' prefix
235
+ TAG=${GITHUB_REF#refs/tags/}
236
+
233
237
cat << EOF > manifest-entry.yaml
234
238
- selector: ${{ matrix.platform }}
235
- uri: "https://github.com/${{ github.repository }}/releases/download/v2.0.0-test /cli.tar.gz"
239
+ uri: "https://github.com/${{ github.repository }}/releases/download/${TAG} /cli.tar.gz"
236
240
sha256: "${SHA256}"
237
241
bin: "cli-binary-${{matrix.platform}}/hasura-ndc-sqlserver${{ matrix.extension }}"
238
242
EOF
@@ -253,6 +257,7 @@ jobs:
253
257
254
258
create-cli-package :
255
259
needs : build-cli-binaries
260
+ if : startsWith(github.ref, 'refs/tags/v')
256
261
runs-on : ubuntu-latest
257
262
steps :
258
263
- name : Download all binaries
@@ -293,12 +298,12 @@ jobs:
293
298
release :
294
299
name : release to GitHub
295
300
needs :
296
- # - push-docker-images # not strictly necessary, but if this fails, we should abort
301
+ - push-docker-images # not strictly necessary, but if this fails, we should abort
297
302
- build-cli-binaries
298
303
- create-cli-package
299
304
runs-on : ubuntu-latest
300
305
# We release when a tag is pushed.
301
- # if: startsWith(github.ref, 'refs/tags/v')
306
+ if : startsWith(github.ref, 'refs/tags/v')
302
307
steps :
303
308
- uses : actions/checkout@v4
304
309
@@ -307,9 +312,9 @@ jobs:
307
312
name : release-artifacts
308
313
path : release/artifacts
309
314
310
- # - name: generate a changelog
311
- # run: |
312
- # ./scripts/release-notes.py "${GITHUB_REF_NAME}" >> release/notes.md
315
+ - name : generate a changelog
316
+ run : |
317
+ ./scripts/release-notes.py "${GITHUB_REF_NAME}" >> release/notes.md
313
318
314
319
- name : generate a connector package
315
320
run : |
@@ -326,5 +331,5 @@ jobs:
326
331
uses : ncipollo/release-action@v1
327
332
with :
328
333
draft : true
329
- # bodyFile: release/notes.md
334
+ bodyFile : release/notes.md
330
335
artifacts : release/artifacts/*
0 commit comments