diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9b206ff..340380a 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -21,10 +21,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -33,4 +33,4 @@ jobs: # queries: ./path/to/local/query, your-org/your-repo/queries@main - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index b12f5d0..9c9f53a 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -16,10 +16,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.8 @@ -39,10 +39,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.8 diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 9cc5c2c..06692a2 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -1,4 +1,4 @@ -name: "Publish to PyPI" +name: "Build and Publish" on: push: @@ -11,32 +11,49 @@ on: - cron: '30 22 15 * *' jobs: - build-and-publish: - name: Build and publish Python distributions to PyPI + build: + name: Build Python distributions runs-on: ubuntu-latest + strategy: + # Matrix to exercise the build backend on all versions of python supported + matrix: + python: ['3.8', '3.9', '3.10', '3.11', '3.12'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - name: Set up Python 3.9 - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: ${{ matrix.python }} - name: Install pypa/build run: | pip install build + python --version pip list - name: Build a binary wheel and a source tarball run: python -m build + - uses: actions/upload-artifact@v4 + with: + name: distributions-built-with-py${{ matrix.python }} + path: dist/ + + publish: + name: "Publish to PyPI" + # Only upload for an actual tag + if: ${{ startsWith(github.ref, 'refs/tags') }} + runs-on: ubuntu-latest + needs: + - build + steps: + - uses: actions/download-artifact@v4 + with: + # Download distributions from one job of the matrix + name: "distributions-built-with-py-3.12" + path: "dist" + - name: Publish distribution to PyPI - if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_API_TOKEN }} - - - uses: actions/upload-artifact@v3 - with: - name: pypi-packages - path: dist/ diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8c93441..3a95609 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -69,10 +69,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} diff --git a/MANIFEST.in b/MANIFEST.in index a44c8b9..edcaaa0 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,2 @@ -include LICENSE -include README.rst include ChangeLog.rst +graft tests diff --git a/pyproject.toml b/pyproject.toml index bf6ea45..6484e68 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools ~= 63.4"] +requires = ["setuptools ~= 70.0"] build-backend = "setuptools.build_meta" [tool.pytest.ini_options]