From 8573b8ecc8359019c36a04fdb321032da0307819 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Mon, 13 May 2024 13:42:17 -0700 Subject: [PATCH] Publish releases using pypa/gh-action-pypi-publish@release/v1 --- .github/workflows/publish.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9f96d927..43654d6b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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