Bump actions/download-artifact from 5 to 7 #197
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| tags: [v*.*.*] | |
| jobs: | |
| build: | |
| name: Test & Build | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ["3.11"] | |
| include: | |
| - os: ubuntu-latest | |
| python-version: "3.8" | |
| - os: ubuntu-latest | |
| python-version: "3.9" | |
| - os: ubuntu-latest | |
| python-version: "3.10" | |
| env: | |
| OS: ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 # fetch all history for setuptools_scm to be able to read tags | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install python dependencies | |
| run: pip install .[dev,build] | |
| - name: Run tests | |
| shell: bash | |
| run: | | |
| # Set up git user for git command to work with tests | |
| git config --global user.name "tests" | |
| git config --global user.email "[email protected]" | |
| pytest -v --cov=autobuild --cov-report=xml tests/ | |
| - name: Build python package | |
| run: python -m build | |
| - uses: actions/upload-artifact@v4 | |
| if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' | |
| with: | |
| name: dist | |
| path: dist | |
| publish: | |
| name: Publish to PyPI | |
| needs: build | |
| runs-on: [ubuntu-latest] | |
| permissions: | |
| id-token: write | |
| if: github.event_name != 'pull_request' | |
| steps: | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: dist | |
| path: dist | |
| - name: Test Publish package | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| continue-on-error: true | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ | |
| attestations: false | |
| - name: Publish package | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| if: startsWith(github.event.ref, 'refs/tags/v') |