Skip to content

Commit 73febd0

Browse files
committed
Add check-release-fileset action to release workflows
Integrate wamp-cicd check-release-fileset action for comprehensive wheel validation and cleanup: 1. **Stable Release (PyPI):** - Validates exact set of 16 required wheels + source - Removes dev wheels (linux_*) and metadata files (CHECKSUMS) - Replaces ~30 lines of manual cleanup with declarative action 2. **Development & Nightly Releases (GitHub):** - Validates exact set of 16 required wheels + source - Keeps metadata files (keep-metadata: true) for user verification - Removes dev wheels but preserves CHECKSUMS/VALIDATION.txt **Wheel targets validated (16 total):** - CPython 3.11-3.14: Linux (x86_64, ARM64), macOS ARM64, Windows - PyPy 3.11: Linux (x86_64, ARM64), macOS ARM64, Windows **Benefits:** - DRY: Single source of truth across zlmdb, autobahn-python, cfxdb - Fail-fast: Catches missing/extra wheels before upload - Self-documenting: Workflow explicitly declares requirements - Consistency: Same validation logic for all WAMP projects Follows pattern successfully deployed in zlmdb v25.10.2.
1 parent 7726514 commit 73febd0

File tree

1 file changed

+74
-28
lines changed

1 file changed

+74
-28
lines changed

.github/workflows/release.yml

Lines changed: 74 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,31 @@ jobs:
732732
echo "FlatBuffers schema: $(ls release-artifacts/flatbuffers-schema.tar.gz 2>/dev/null && echo 'packaged' || echo 'not found')"
733733
echo "Conformance reports: $(ls release-artifacts/autobahn-python-websocket-conformance-*.tar.gz 2>/dev/null && echo 'packaged' || echo 'not found')"
734734
735+
- name: Validate and clean release fileset for GitHub
736+
uses: wamp-proto/wamp-cicd/actions/check-release-fileset@main
737+
with:
738+
distdir: release-artifacts
739+
mode: strict
740+
keep-metadata: true # Keep CHECKSUMS for user verification
741+
targets: |
742+
cpy311-linux-x86_64-manylinux_2_34
743+
cpy311-linux-aarch64-manylinux_2_28
744+
cpy311-win-amd64
745+
cpy312-linux-x86_64-manylinux_2_34
746+
cpy312-win-amd64
747+
cpy313-macos-arm64
748+
cpy313-linux-x86_64-manylinux_2_34
749+
cpy313-linux-aarch64-manylinux_2_28
750+
cpy313-win-amd64
751+
cpy314-macos-arm64
752+
cpy314-linux-x86_64-manylinux_2_34
753+
cpy314-win-amd64
754+
pypy311-macos-arm64
755+
pypy311-linux-x86_64-manylinux_2_34
756+
pypy311-linux-aarch64-manylinux_2_17
757+
pypy311-win-amd64
758+
source
759+
735760
- name: Validate all wheels before release (Final Gate)
736761
run: |
737762
set -o pipefail
@@ -1462,6 +1487,31 @@ jobs:
14621487
echo "FlatBuffers schema: $(ls release-artifacts/flatbuffers-schema.tar.gz 2>/dev/null && echo 'packaged' || echo 'not found')"
14631488
echo "Conformance reports: $(ls release-artifacts/autobahn-python-websocket-conformance-*.tar.gz 2>/dev/null && echo 'packaged' || echo 'not found')"
14641489
1490+
- name: Validate and clean release fileset for GitHub
1491+
uses: wamp-proto/wamp-cicd/actions/check-release-fileset@main
1492+
with:
1493+
distdir: release-artifacts
1494+
mode: strict
1495+
keep-metadata: true # Keep CHECKSUMS for user verification
1496+
targets: |
1497+
cpy311-linux-x86_64-manylinux_2_34
1498+
cpy311-linux-aarch64-manylinux_2_28
1499+
cpy311-win-amd64
1500+
cpy312-linux-x86_64-manylinux_2_34
1501+
cpy312-win-amd64
1502+
cpy313-macos-arm64
1503+
cpy313-linux-x86_64-manylinux_2_34
1504+
cpy313-linux-aarch64-manylinux_2_28
1505+
cpy313-win-amd64
1506+
cpy314-macos-arm64
1507+
cpy314-linux-x86_64-manylinux_2_34
1508+
cpy314-win-amd64
1509+
pypy311-macos-arm64
1510+
pypy311-linux-x86_64-manylinux_2_34
1511+
pypy311-linux-aarch64-manylinux_2_17
1512+
pypy311-win-amd64
1513+
source
1514+
14651515
- name: Validate all wheels before release (Final Gate)
14661516
run: |
14671517
set -o pipefail
@@ -2054,34 +2104,30 @@ jobs:
20542104
echo "Safe to proceed with PyPI upload."
20552105
fi
20562106
2057-
- name: List artifacts for PyPI publishing
2058-
run: |
2059-
echo "Publishing to PyPI for release: $RELEASE_NAME"
2060-
ls -la dist/
2061-
echo ""
2062-
echo "macOS wheels: $(find dist -name "*macos*.whl" 2>/dev/null | wc -l)"
2063-
echo "Windows wheels: $(find dist -name "*win*.whl" 2>/dev/null | wc -l)"
2064-
echo "Linux manylinux wheels: $(find dist -name "*manylinux*.whl" 2>/dev/null | wc -l)"
2065-
echo "Linux fallback wheels: $(find dist -name "*linux*.whl" ! -name "*manylinux*.whl" 2>/dev/null | wc -l)"
2066-
echo "Source distributions: $(find dist -name "*.tar.gz" 2>/dev/null | wc -l)"
2067-
echo ""
2068-
echo "Total PyPI artifacts: $(find dist -type f \( -name "*.whl" -o -name "*.tar.gz" \) | wc -l)"
2069-
2070-
- name: Clean non-package files and unsupported wheels from dist/
2071-
run: |
2072-
echo "==> Removing non-package files from dist/ before PyPI upload..."
2073-
find dist/ -type f ! \( -name "*.whl" -o -name "*.tar.gz" \) -delete
2074-
2075-
echo "==> Removing plain linux_* wheels (PyPI only accepts manylinux_*)..."
2076-
# PyPI rejects plain linux_x86_64/linux_aarch64 tags - they must be manylinux_*
2077-
find dist/ -name "*-linux_x86_64.whl" -delete
2078-
find dist/ -name "*-linux_aarch64.whl" -delete
2079-
2080-
echo ""
2081-
echo "Remaining files for PyPI:"
2082-
ls -la dist/
2083-
echo ""
2084-
echo "Total PyPI artifacts: $(find dist -type f \( -name "*.whl" -o -name "*.tar.gz" \) | wc -l)"
2107+
- name: Validate and clean release fileset for PyPI
2108+
uses: wamp-proto/wamp-cicd/actions/check-release-fileset@main
2109+
with:
2110+
distdir: dist
2111+
mode: strict
2112+
# keep-metadata: false (default - removes CHECKSUMS for PyPI)
2113+
targets: |
2114+
cpy311-linux-x86_64-manylinux_2_34
2115+
cpy311-linux-aarch64-manylinux_2_28
2116+
cpy311-win-amd64
2117+
cpy312-linux-x86_64-manylinux_2_34
2118+
cpy312-win-amd64
2119+
cpy313-macos-arm64
2120+
cpy313-linux-x86_64-manylinux_2_34
2121+
cpy313-linux-aarch64-manylinux_2_28
2122+
cpy313-win-amd64
2123+
cpy314-macos-arm64
2124+
cpy314-linux-x86_64-manylinux_2_34
2125+
cpy314-win-amd64
2126+
pypy311-macos-arm64
2127+
pypy311-linux-x86_64-manylinux_2_34
2128+
pypy311-linux-aarch64-manylinux_2_17
2129+
pypy311-win-amd64
2130+
source
20852131
20862132
- name: Check if version already exists on PyPI
20872133
id: pypi_check

0 commit comments

Comments
 (0)