Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #104
Workflow file for this run
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: Packaging (chapter 8) | |
on: | |
- push | |
jobs: | |
format: | |
name: Check formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/[email protected] | |
with: | |
python-version: "3.10" | |
- name: Install tox | |
run: python -m pip install tox | |
- name: Run black | |
run: tox -e format | |
working-directory: ch08/first-python-package # You don't need this in your package | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/[email protected] | |
with: | |
python-version: "3.10" | |
- name: Install tox | |
run: python -m pip install tox | |
- name: Run flake8 | |
run: tox -e lint | |
working-directory: ch08/first-python-package # You don't need this in your package | |
typecheck: | |
name: Type check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/[email protected] | |
with: | |
python-version: "3.10" | |
- name: Install tox | |
run: python -m pip install tox | |
- name: Run mypy | |
run: python -m tox -e typecheck | |
working-directory: ch08/first-python-package # You don't need this in your package | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: | |
- version: "3.10" | |
toxenv: "py310" | |
- version: "3.9" | |
toxenv: "py39" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python.version }} | |
- name: Install tox | |
run: python -m pip install tox | |
- name: Run pytest | |
run: tox -e ${{ matrix.python.toxenv }} | |
working-directory: ch08/first-python-package # You don't need this in your package | |
build_source_dist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/[email protected] | |
with: | |
python-version: "3.10" | |
- name: Install build | |
run: python -m pip install build | |
- name: Run build | |
run: python -m build --sdist | |
working-directory: ch08/first-python-package # You don't need this in your package | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ch08/first-python-package/dist/*.tar.gz | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, windows-2019, macOS-10.15] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/[email protected] | |
with: | |
python-version: "3.10" | |
- name: Install cibuildwheel | |
run: python -m pip install cibuildwheel==2.3.1 | |
- name: Build wheels | |
run: python -m cibuildwheel --output-dir wheels | |
working-directory: ch08/first-python-package # You don't need this in your package | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./ch08/first-python-package/wheels/*.whl # Update to match root of package | |
# Avoid double-publishing from other workflows | |
# publish: | |
# name: Publish package | |
# if: startsWith(github.event.ref, 'refs/tags/v') | |
# needs: | |
# - format | |
# - lint | |
# - typecheck | |
# - test | |
# - build_source_dist | |
# - build_wheels | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/download-artifact@v2 | |
# with: | |
# name: artifact | |
# path: ./ch08/first-python-package/dist # Update to match root of package | |
# - uses: pypa/[email protected] | |
# with: | |
# user: __token__ | |
# password: ${{ secrets.PYPI_API_TOKEN }} | |
# packages_dir: ./ch08/first-python-package/dist/ # You don't need this in your package |