diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index e4a0558..bb2d10a 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -69,7 +69,8 @@ jobs: uses: AndreMiras/coveralls-python-action@f5fd5c309b39d01599fb92c72d4f7409ea78aec9 with: parallel: true - flag-name: OS,PYTHON + flag-name: ${{ matrix.python-version }} (${{ matrix.os }}) + coveralls_finish: needs: test @@ -85,8 +86,8 @@ jobs: needs: test name: Deploy to PyPI runs-on: ubuntu-latest - # Only from the origin repository, not forks; only master. - if: github.repository_owner == 'prisae' && github.ref == 'refs/heads/master' + # Only from the origin repository, not forks; only master and tags. + if: github.repository_owner == 'prisae' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) steps: # Checks-out your repository under $GITHUB_WORKSPACE @@ -118,11 +119,15 @@ jobs: pip install -r requirements-dev.txt - name: Build source and wheel distributions + if: github.ref == 'refs/heads/master' run: | # Change setuptools-scm local_scheme to "no-local-version" so the # local part of the version isn't included, making the version string # compatible with Test PyPI. sed --in-place "s/'root'/'local_scheme':'no-local-version','root'/g" setup.py + + - name: Build source and wheel distributions + run: | # Build source and wheel packages python setup.py sdist python setup.py bdist_wheel