From a77eb85caff9bdeecea2cea9c3d09f5b15a4cbec Mon Sep 17 00:00:00 2001 From: akadeepesh Date: Fri, 15 May 2026 14:43:29 +0530 Subject: [PATCH] Add Python publish workflow for automated package release to PyPI --- ...ython-publish.yml => python-publish.disabled.yml} | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename .github/workflows/{python-publish.yml => python-publish.disabled.yml} (87%) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.disabled.yml similarity index 87% rename from .github/workflows/python-publish.yml rename to .github/workflows/python-publish.disabled.yml index f6eb432..3726781 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.disabled.yml @@ -27,10 +27,10 @@ jobs: echo "Package version : $PKG_VERSION" echo "Release tag : $TAG_VERSION" if [ "$PKG_VERSION" != "$TAG_VERSION" ]; then - echo "❌ Version mismatch — update __init__.py and pyproject.toml before releasing" + echo "Version mismatch — update __init__.py and pyproject.toml before releasing" exit 1 fi - echo "✅ Versions match" + echo "Versions match" # ── Job 2: Build the distributions ──────────────────────────────────────── build: @@ -55,12 +55,12 @@ jobs: import zipfile, sys, os wheels = [f for f in os.listdir("dist") if f.endswith(".whl")] if not wheels: - print("❌ No wheel found in dist/"); sys.exit(1) + print("No wheel found in dist/"); sys.exit(1) with zipfile.ZipFile(f"dist/{wheels[0]}") as z: names = z.namelist() if not any("entry_points.txt" in n for n in names): - print("❌ entry_points.txt missing from wheel"); sys.exit(1) - print(f"✅ Wheel OK: {wheels[0]}") + print("entry_points.txt missing from wheel"); sys.exit(1) + print(f"Wheel OK: {wheels[0]}") ep = [n for n in names if "entry_points" in n][0] print(z.read(ep).decode()) EOF @@ -76,7 +76,7 @@ jobs: runs-on: ubuntu-latest needs: build permissions: - id-token: write # required for trusted publishing + id-token: write # required for trusted publishing environment: name: pypi url: https://pypi.org/project/contextzip/${{ github.event.release.tag_name }}