From 59afdc60433ab7c1d37b75817a97c76845f97ce9 Mon Sep 17 00:00:00 2001 From: Mick Grove Date: Sun, 29 Mar 2026 23:28:19 -0700 Subject: [PATCH] fixed github actions --- .github/workflows/pypi.yml | 7 +++++-- scripts/build-pypi-wheel.sh | 5 +++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 44773f4..d6aa187 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -33,9 +33,12 @@ jobs: run: | set -euo pipefail if [[ -z "${INPUT_TAG}" ]]; then + set +e TAG="$(gh release view --repo "${GITHUB_REPOSITORY}" --json tagName -q .tagName)" - if [[ -z "${TAG}" ]]; then - echo "No tag provided and failed to determine latest release tag" >&2 + gh_status=$? + set -e + if [[ ${gh_status} -ne 0 || -z "${TAG}" ]]; then + echo "No tag provided and failed to determine latest release tag (gh release view exit status: ${gh_status})" >&2 exit 1 fi else diff --git a/scripts/build-pypi-wheel.sh b/scripts/build-pypi-wheel.sh index 03e29dd..730398d 100755 --- a/scripts/build-pypi-wheel.sh +++ b/scripts/build-pypi-wheel.sh @@ -77,6 +77,11 @@ if [[ -z "$binary_path" ]]; then exit 1 fi +if [[ -z "$version" ]]; then + echo "Missing --version" >&2 + exit 1 +fi + if [[ "$binary_path" != /* ]]; then # interpret relative to the directory where the user invoked the script binary_path="$PWD/$binary_path"