Publish releases using pypa/gh-action-pypi-publish@release/v1

This commit is contained in:
Simon Willison 2024-05-13 13:42:17 -07:00 committed by GitHub
parent 9a3236db61
commit 8573b8ecc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -29,23 +29,23 @@ jobs:
pytest
deploy:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
needs: [test]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: '3.12'
cache: pip
cache-dependency-path: setup.py
- name: Install dependencies
run: |
pip install setuptools wheel twine build
- name: Publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
pip install setuptools wheel build
- name: Build
run: |
python -m build
twine upload dist/*
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1