CI: Switch to PyPI trusted publisher

This replaces using a fixed secret API token that is attached to a
single user.
This commit is contained in:
Ryan May 2023-04-24 14:09:58 -06:00 committed by Ryan May
parent 408351b500
commit 5f875d32ec
No known key found for this signature in database
GPG key ID: 3DD4CCAA4E25AC3E

View file

@ -38,6 +38,8 @@ jobs:
environment: environment:
name: PyPI name: PyPI
url: https://pypi.org/project/python-awips/ url: https://pypi.org/project/python-awips/
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Download packages - name: Download packages
@ -47,7 +49,4 @@ jobs:
name: artifact name: artifact
- name: Publish Package - name: Publish Package
uses: pypa/gh-action-pypi-publish@v1.4.2 uses: pypa/gh-action-pypi-publish@v1.12.4
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}