From a2ed371e2c3365606f31ab0bdc688f45157b8290 Mon Sep 17 00:00:00 2001 From: Leo Galambos Date: Mon, 10 Aug 2026 23:18:33 +0200 Subject: [PATCH] fix(ci): provide repository context for GitHub releases --- .github/workflows/python-models-standard-release.yml | 7 +++++-- .github/workflows/python-release.yml | 10 +++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-models-standard-release.yml b/.github/workflows/python-models-standard-release.yml index a11b8d8..46ec7ba 100644 --- a/.github/workflows/python-models-standard-release.yml +++ b/.github/workflows/python-models-standard-release.yml @@ -188,15 +188,18 @@ jobs: RELEASE_VERSION: ${{ needs.build.outputs.version }} run: | set -euo pipefail - if gh release view "${RELEASE_TAG}" >/dev/null 2>&1; then + if gh release view "${RELEASE_TAG}" \ + --repo "${GITHUB_REPOSITORY}" >/dev/null 2>&1; then echo "Release already exists; refusing to replace its assets: ${RELEASE_TAG}" >&2 exit 1 fi gh release create "${RELEASE_TAG}" \ release/*.whl release/*.tar.gz release/SHA256SUMS \ + --repo "${GITHUB_REPOSITORY}" \ --verify-tag --draft --title "radixor-models-standard ${RELEASE_VERSION}" \ --notes "Precompiled standard Radixor model distribution ${RELEASE_VERSION}." - gh release edit "${RELEASE_TAG}" --draft=false + gh release edit "${RELEASE_TAG}" \ + --repo "${GITHUB_REPOSITORY}" --draft=false publish-index: name: Publish Python package index diff --git a/.github/workflows/python-release.yml b/.github/workflows/python-release.yml index de44e84..916a204 100644 --- a/.github/workflows/python-release.yml +++ b/.github/workflows/python-release.yml @@ -388,7 +388,8 @@ jobs: GH_TOKEN: ${{ github.token }} run: | set -euo pipefail - [[ "$(gh release view 'python-models-standard@1.0.0' --json isDraft --jq '.isDraft')" == 'false' ]] + [[ "$(gh release view 'python-models-standard@1.0.0' \ + --repo "${GITHUB_REPOSITORY}" --json isDraft --jq '.isDraft')" == 'false' ]] - name: Attest package artifacts uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2 @@ -405,15 +406,18 @@ jobs: RELEASE_VERSION: ${{ needs.prepare.outputs.version }} run: | set -euo pipefail - if gh release view "${RELEASE_TAG}" >/dev/null 2>&1; then + if gh release view "${RELEASE_TAG}" \ + --repo "${GITHUB_REPOSITORY}" >/dev/null 2>&1; then echo "Release already exists; refusing to replace its assets: ${RELEASE_TAG}" >&2 exit 1 fi gh release create "${RELEASE_TAG}" \ release/*.whl release/*.tar.gz release/SHA256SUMS \ + --repo "${GITHUB_REPOSITORY}" \ --verify-tag --draft --title "radixor ${RELEASE_VERSION}" \ --notes "Native Rust/Python Radixor distribution ${RELEASE_VERSION}." - gh release edit "${RELEASE_TAG}" --draft=false + gh release edit "${RELEASE_TAG}" \ + --repo "${GITHUB_REPOSITORY}" --draft=false publish-index: name: Publish Python package index