Skip to content

Commit a926e4b

Browse files
author
Denis Jelovina
committed
Bump package version to 0.8.31 in pyproject.toml; update promote-to-pypi workflow to handle missing release metadata
1 parent de02f0d commit a926e4b

File tree

2 files changed

+6
-26
lines changed

2 files changed

+6
-26
lines changed

.github/workflows/promote-to-pypi.yml

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,10 @@ jobs:
4242
echo "Downloading release assets for ${REPO} tag ${TAG}"
4343
mkdir -p release_assets
4444
# Fetch release metadata for the tag
45-
release_json=$(curl -sS -H "Authorization: Bearer ${GITHUB_TOKEN}" "https://api.github.com/repos/${REPO}/releases/tags/${TAG}" || true)
46-
if [ -z "${release_json}" ] || [ "${release_json}" = "null" ]; then
47-
echo "No release metadata found for tag ${TAG}; nothing to download. Skipping publish."
48-
mkdir -p release_assets
49-
exit 0
50-
fi
51-
# If there are no assets, skip downloading to avoid jq iterating over null
52-
assets_len=$(echo "$release_json" | jq '.assets | length // 0')
53-
if [ "$assets_len" -eq 0 ]; then
54-
echo "Release ${TAG} has no assets (assets length = ${assets_len}); skipping download and publish."
55-
mkdir -p release_assets
56-
exit 0
45+
release_json=$(curl -sSf -H "Authorization: Bearer ${GITHUB_TOKEN}" "https://api.github.com/repos/${REPO}/releases/tags/${TAG}")
46+
if [ -z "${release_json}" ]; then
47+
echo "No release metadata found for tag ${TAG}" >&2
48+
exit 1
5749
fi
5850
5951
# Iterate assets and download each one using the assets API (requires Accept header)
@@ -67,24 +59,12 @@ jobs:
6759
run: |
6860
echo "Assets in release_assets:"
6961
ls -la release_assets || true
70-
- name: Check for wheel assets
71-
id: assets_check
72-
run: |
73-
set -euo pipefail
74-
mkdir -p release_assets
75-
count=0
76-
# Count wheel files (if any). Use glob safely.
77-
shopt -s nullglob || true
78-
files=(release_assets/*.whl)
79-
count=${#files[@]}
80-
echo "Found $count .whl files in release_assets"
81-
echo "asset_count=$count" >> $GITHUB_OUTPUT
62+
8263
- name: Show package name and version (diagnostic)
8364
run: |
8465
python -c "import importlib,importlib.util,sys,pathlib; spec=importlib.util.find_spec('tomllib') or importlib.util.find_spec('tomli'); name=spec.name if spec else sys.exit(print('No TOML parser available (tomllib/tomli), skipping')); toml=importlib.import_module(name); p=pathlib.Path('pyalp/pyproject.toml'); (sys.exit(print('pyalp/pyproject.toml not found at', p)) if not p.exists() else None); data=toml.loads(p.read_text()); proj=data.get('project',{}); print('project.name =', proj.get('name')); print('project.version =', proj.get('version'))"
8566
8667
- name: Publish to PyPI (alp-graphblas)
87-
if: ${{ steps.assets_check.outputs.asset_count != '0' }}
8868
uses: pypa/gh-action-pypi-publish@release/v1
8969
with:
9070
packages-dir: release_assets/

pyalp/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "alp-graphblas"
7-
version = "0.8.30"
7+
version = "0.8.31"
88
description = "Python bindings for ALP GraphBLAS (minimal package layout)"
99
authors = [ { name = "ALP" } ]
1010
readme = "README.md"

0 commit comments

Comments
 (0)