diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec58e3e..67fbc02 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,16 +35,3 @@ jobs: run: | python -m tox - uses: codecov/codecov-action@v3 - pypi-publish: - name: Upload release to PyPI - runs-on: ubuntu-latest - environment: - name: pypi - url: https://pypi.org/p/roulier - permissions: - id-token: write # IMPORTANT: this permission is mandatory for trusted publishing - if: startsWith(github.ref, 'refs/tags') - steps: - # retrieve your distributions here - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e728db7 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +on: + release: + types: + - published + +name: release + +jobs: + pypi: + name: upload release to PyPI + runs-on: ubuntu-latest + environment: release + + permissions: + # Used to authenticate to PyPI via OIDC. + id-token: write + + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-python@v4 + with: + python-version: ">= 3.8" + + - name: build + run: pipx run build + + - name: publish + uses: pypa/gh-action-pypi-publish@release/v1