Skip to content

Commit 57d82a4

Browse files
committed
correct ship
1 parent ea82d19 commit 57d82a4

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.github/workflows/ship.yaml

+12-7
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ jobs:
218218
fi
219219
220220
- name: Generate manifest entry
221+
if: startsWith(github.ref, 'refs/tags/v')
221222
shell: bash
222223
run: |
223224
@@ -230,9 +231,12 @@ jobs:
230231
SHA256=$(sha256sum cli/${{ matrix.platform }}/hasura-ndc-sqlserver | cut -d' ' -f1)
231232
fi
232233
234+
# Extract tag from github.ref by removing 'refs/tags/' prefix
235+
TAG=${GITHUB_REF#refs/tags/}
236+
233237
cat << EOF > manifest-entry.yaml
234238
- 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"
236240
sha256: "${SHA256}"
237241
bin: "cli-binary-${{matrix.platform}}/hasura-ndc-sqlserver${{ matrix.extension }}"
238242
EOF
@@ -253,6 +257,7 @@ jobs:
253257

254258
create-cli-package:
255259
needs: build-cli-binaries
260+
if: startsWith(github.ref, 'refs/tags/v')
256261
runs-on: ubuntu-latest
257262
steps:
258263
- name: Download all binaries
@@ -293,12 +298,12 @@ jobs:
293298
release:
294299
name: release to GitHub
295300
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
297302
- build-cli-binaries
298303
- create-cli-package
299304
runs-on: ubuntu-latest
300305
# We release when a tag is pushed.
301-
# if: startsWith(github.ref, 'refs/tags/v')
306+
if: startsWith(github.ref, 'refs/tags/v')
302307
steps:
303308
- uses: actions/checkout@v4
304309

@@ -307,9 +312,9 @@ jobs:
307312
name: release-artifacts
308313
path: release/artifacts
309314

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
313318
314319
- name: generate a connector package
315320
run: |
@@ -326,5 +331,5 @@ jobs:
326331
uses: ncipollo/release-action@v1
327332
with:
328333
draft: true
329-
# bodyFile: release/notes.md
334+
bodyFile: release/notes.md
330335
artifacts: release/artifacts/*

0 commit comments

Comments
 (0)