Chore(deps): bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #69
This file contains 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 & CD | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
release: | |
types: | |
- published | |
jobs: | |
dist: | |
name: Build package | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: | |
- "3.10" | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Build SDist & wheel | |
# Installs `build` before invoking pyproject-build | |
run: | | |
pip install build wheel | |
pyproject-build -ws | |
- name: Check metadata | |
run: | | |
pip install twine | |
twine check dist/* | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: build | |
path: dist/* | |
checks: | |
name: Check Python ${{ matrix.python-version }} | |
needs: [dist] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: | |
- "3.7" | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/[email protected] | |
with: | |
name: build | |
path: dist | |
- name: Install build + test dependencies | |
run: pip install pytest dist/*.whl nbconvert ipykernel | |
- name: Test package | |
run: literary test | |
publish: | |
name: Publish to PyPI | |
needs: [dist, checks] | |
runs-on: ubuntu-latest | |
if: github.event_name == 'release' && github.event.action == 'published' | |
steps: | |
- uses: actions/[email protected] | |
with: | |
name: build | |
path: dist | |
- uses: pypa/[email protected] | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_TOKEN }} |