From f014f9ed9f42243fa0d98523c1eb84bb6a476fc6 Mon Sep 17 00:00:00 2001 From: Alan Murray Date: Sat, 23 Dec 2023 01:26:56 +1100 Subject: [PATCH] Update python-publish.yml --- .github/workflows/python-publish.yml | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index c284904..ff66bee 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -14,21 +14,16 @@ on: types: [published] jobs: - deploy: + pypi-publish: + name: Upload release to PyPI runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/aiopulse + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build - - name: Build package - run: python -m build - - name: Publish package - uses: pypa/gh-action-pypi-publish@v1 - with: - password: ${{ secrets.PYPI_API_TOKEN }} + # retrieve your distributions here + + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1