From 3998f06edbe48c35f70ef6c1286c4fb31e7be570 Mon Sep 17 00:00:00 2001 From: Joseph Birkner Date: Thu, 23 Jul 2026 16:59:19 +0200 Subject: [PATCH] ci: limit PyPI previews to release branches --- .github/workflows/ci-deploy.yaml | 5 +---- docs/mapget-dev-guide.md | 14 ++++++++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-deploy.yaml b/.github/workflows/ci-deploy.yaml index ddb3658e..323b7197 100644 --- a/.github/workflows/ci-deploy.yaml +++ b/.github/workflows/ci-deploy.yaml @@ -281,8 +281,7 @@ jobs: deploy: needs: [determine-version, build-manylinux, build-manylinux-aarch64, build] if: | - (github.event_name == 'push' && - (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))) || + (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) || (github.event_name == 'pull_request' && github.base_ref == 'main' && startsWith(github.head_ref, 'release/')) || (github.event_name == 'workflow_dispatch' && startsWith(github.ref, 'refs/tags/v')) runs-on: ubuntu-latest @@ -339,8 +338,6 @@ jobs: run: | if [[ "${{ github.event_name }}" == "pull_request" ]]; then echo "Uploading release PR development version ${{ steps.version.outputs.version }} to PyPI..." - elif [[ "${{ github.ref }}" == "refs/heads/main" ]]; then - echo "Uploading development snapshot version ${{ steps.version.outputs.version }} to PyPI..." else echo "Uploading release version ${{ steps.version.outputs.version }} to PyPI..." fi diff --git a/docs/mapget-dev-guide.md b/docs/mapget-dev-guide.md index 6519f34e..a681df43 100644 --- a/docs/mapget-dev-guide.md +++ b/docs/mapget-dev-guide.md @@ -425,10 +425,16 @@ When the guarded release workflow succeeds, GitHub Actions will automatically: ### Development Snapshots -Every push to the `main` branch automatically triggers a development release: -- Version is determined by `setuptools_scm` (e.g., `2025.3.0.dev61` for the 61st commit after the last tag) -- Development versions are uploaded to PyPI and can be installed with `pip install mapget --pre` -- No manual intervention required - the version is automatically derived from git history +Pull requests from `release/X.Y.Z` to `main` publish development previews: + +- The preview version uses the planned CMake version and a unique CI serial + (for example, `2026.3.5.dev31001`). +- Development versions can be installed with `pip install mapget --pre`. +- Ordinary `main` pushes run the complete wheel matrix but do not upload + another PyPI snapshot. +- Superseded development previews should be deleted from PyPI after the final + release is available. Retaining every platform wheel from every preview will + eventually exhaust PyPI's per-project storage quota. ### Version Management