update codecov action #15
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: Build | |
on: | |
# TODO Can we make this workflow depend on unittests to avoid building broken packages? | |
# As it seems: no, we cannot. At least not really. Jobs can depend on other jobs, but workflows | |
# cannot depend on other workflows. But jobs cannot be triggered by events, only workflows are | |
# triggered by events. That means we would need to run the build/upload job for every commit | |
# and every Python version and then check if it is the right Python version and if there is a | |
# new tag and only then really upload a package. | |
# The only additional advantage of this approach might be that we could test the package | |
# building process for every commit and every Python version comfortably. | |
# | |
# Note: building the package is also tested in unittests.yml. | |
# | |
# https://github.community/t/how-do-i-specify-job-dependency-running-in-another-workflow/16482/2 | |
# https://docs.github.com/en/actions/learn-github-actions/managing-complex-workflows#creating-dependent-jobs | |
push: | |
tags: | |
- v* | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Upgrade pip | |
run: python -m pip install --upgrade pip | |
- name: Build a binary wheel and a source tarball | |
run: python setup.py bdist_wheel | |
- name: Publish distribution package to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |