diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 32e30ff..5ce177b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ on: - synchronize push: branches: - - main + - main tags: - '*' jobs: @@ -53,13 +53,13 @@ jobs: pip install --no-deps -e . - name: Lint with flake8 run: | - flake8 . + flake8 . - name: Check formatting with black run: | - black --check . + black --check . - name: Check import ordering with isort run: | - isort --check . + isort --check . - name: Test (macOS) if: ${{ matrix.os == 'macos-latest' }} run: | @@ -94,17 +94,17 @@ jobs: run: | git fetch --prune --unshallow git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - name: Build sdist - run: >- - pip install build && python -m build --sdist - - name: Publish distribution 📦 to TestPyPI + - name: Build distributions + run: >- + pip install build && python -m build + - name: Publish distributions 📦 to TestPyPI if: github.ref == 'refs/heads/main' uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.TEST_PYPI_API_TOKEN }} repository-url: https://test.pypi.org/legacy/ skip-existing: true - - name: Publish distribution 📦 to PyPI + - name: Publish distributions 📦 to PyPI if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1 with: