Skip to content

Commit a0073bb

Browse files
committed
ci: Fix missing repo error on wheels build CI (#1674)
The `tket-exts` and `tket-eccs` releases failed due to `gh release view` not being able to find the default repo. I'm not sure what changed, since we haven't modified that part of the workflows in a bit (I though there was an env var with the repo name...). We fix that here by manually checking out the repo first, so `gh` can see the `.git` dir. Error: https://github.com/Quantinuum/tket2/actions/runs/27346814007/job/80798143094#step:2:12 drive-by: Replace `if [ $? -ne 0 ]` with `if ! {cmd}` so we actually run the `echo` before github aborts the job.
1 parent 2ee0582 commit a0073bb

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎.github/workflows/python-pure-wheels.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,12 @@ jobs:
107107
# Used to generate artifact attestation
108108
attestations: write
109109
steps:
110+
- uses: actions/checkout@v6
110111
- name: Check if the tag has an associated release
111112
env:
112113
GH_TOKEN: ${{ github.token }}
113114
run: |
114-
gh release view ${{ github.ref_name }}
115-
if [ $? -ne 0 ]; then
115+
if ! gh release view ${{ github.ref_name }}; then
116116
echo "No release found for tag ${{ github.ref_name }}"
117117
exit 1
118118
fi

‎.github/workflows/python-qis-wheels.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@ jobs:
9090
# Used to generate artifact attestation
9191
attestations: write
9292
steps:
93+
- uses: actions/checkout@v6
9394
- name: Check if the tag has an associated release
9495
env:
9596
GH_TOKEN: ${{ github.token }}
9697
run: |
97-
gh release view ${{ github.ref_name }}
98-
if [ $? -ne 0 ]; then
98+
if ! gh release view ${{ github.ref_name }}; then
9999
echo "No release found for tag ${{ github.ref_name }}"
100100
exit 1
101101
fi

‎.github/workflows/python-wheels.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,12 +293,12 @@ jobs:
293293
# Used to generate artifact attestation
294294
attestations: write
295295
steps:
296+
- uses: actions/checkout@v6
296297
- name: Check if the tag has an associated release
297298
env:
298299
GH_TOKEN: ${{ github.token }}
299300
run: |
300-
gh release view ${{ github.ref_name }}
301-
if [ $? -ne 0 ]; then
301+
if ! gh release view ${{ github.ref_name }}; then
302302
echo "No release found for tag ${{ github.ref_name }}"
303303
exit 1
304304
fi

0 commit comments

Comments
 (0)