diff options
Diffstat (limited to '')
-rw-r--r-- | .github/workflows/python.yml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 240049e..6ad222c 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -34,15 +34,19 @@ jobs: - name: Build run: python -m build - name: Test - run: python -m unittest discover -s src/locusts-r-us + run: python -m unittest discover -s src publish: name: Publish to PyPI needs: build-and-test - if: ${{ github.event_name == 'tag' && startsWith(github.ref, 'refs/tags') }} + # Only run on this on proper semver (vX.Y.Z) tags + if: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }} runs-on: ubuntu-latest permissions: id-token: write + environment: + name: pypi + url: https://pypi.org/r/locusts-r-us steps: - name: Checkout repository uses: actions/checkout@v4 @@ -58,3 +62,5 @@ jobs: run: python -m build --sdist --wheel - name: Publish package distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 + with: + attestations: true |