ci: use newer trusted publishing for pypi

This commit is contained in:
Daylin Morgan 2023-08-22 23:02:41 -05:00
parent 4d84f3730e
commit cd9bc5fe8f
Signed by: daylin
GPG key ID: C1E52E7DD81DF79F

View file

@ -9,6 +9,11 @@ jobs:
build-n-publish: build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/viv
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
@ -23,7 +28,6 @@ jobs:
- name: Build a binary wheel and a source tarball - name: Build a binary wheel and a source tarball
run: >- run: >-
python -m build --sdist --wheel --outdir dist/ . python -m build --sdist --wheel --outdir dist/ .
- name: Publish a Python distribution to PyPI
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1 uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}