diff --git a/.github/workflows/dist-python.yml b/.github/workflows/dist-python.yml index 872a8eacc..27c8964ab 100644 --- a/.github/workflows/dist-python.yml +++ b/.github/workflows/dist-python.yml @@ -52,6 +52,11 @@ jobs: cache-dependency-path: 'bindings/python/pyproject.toml' allow-prereleases: true + - name: Validate pyproject.toml + run: | + pip install 'validate-pyproject[all]' + validate-pyproject pyproject.toml + - name: Build and test dist files run: | export LIBMONGOCRYPT_VERSION=$(cat ./scripts/libmongocrypt-version.txt) @@ -76,6 +81,14 @@ jobs: run: | find . -mindepth 2 -type f -exec mv {} . \; find . -type d -empty -delete + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 + with: + python-version: "3.11" + - name: Check dist metadata + working-directory: . + run: | + pip install twine + twine check --strict *.whl *.tar.gz - uses: actions/upload-artifact@v5 with: name: all-dist-${{ github.run_id }} diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index d37cc8638..39e1d2552 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -85,12 +85,6 @@ jobs: with: name: all-dist-${{ github.run_id }} path: dist/ - - name: Publish package distributions to TestPyPI - uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # release/v1 - with: - repository-url: https://test.pypi.org/legacy/ - skip-existing: true - attestations: ${{ env.DRY_RUN }} - name: Publish package distributions to PyPI if: startsWith(env.DRY_RUN, 'false') uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # release/v1