From 5504e792f3ddb65e4cf8961df4076209c3984c06 Mon Sep 17 00:00:00 2001 From: Chris Rose Date: Sat, 20 Aug 2022 09:49:23 -0700 Subject: [PATCH] Use build-and-inspect-python to verify the dist --- .github/workflows/main.yml | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0a44639..c964c4c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -104,35 +104,11 @@ jobs: with: # We want our tags here fetch-depth: 0 + - uses: hynek/build-and-inspect-python-package@v1.1 - uses: "actions/setup-python@v4" with: python-version: "3.10" - - name: Check if we have the publish key - env: - TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }} - if: "${{ env.TEST_PYPI_API_TOKEN != '' }}" - run: | - echo "DO_PUBLISH=yes" >> $GITHUB_ENV - echo "SETUPTOOLS_SCM_PRETEND_VERSION=0.0.1" >> $GITHUB_ENV - - - name: "Install pep517 and twine" - run: "python -m pip install pep517 twine" - - name: "Build package" - run: "python -m pep517.build --source --binary ." - - name: "List result" - run: "ls -l dist" - - name: "Check long_description" - run: "python -m twine check dist/*" - - name: "Publish package to TestPyPI" - uses: "pypa/gh-action-pypi-publish@release/v1" - if: "${{ env.DO_PUBLISH == 'yes' }}" - with: - user: "__token__" - password: "${{ secrets.TEST_PYPI_API_TOKEN }}" - repository_url: "https://test.pypi.org/legacy/" - skip_existing: true - install-dev: strategy: matrix: