From 3051d571190157921dae88052f343248cf031613 Mon Sep 17 00:00:00 2001 From: Jamie Hale Date: Mon, 14 Oct 2024 21:38:22 +0000 Subject: [PATCH] Change pypi upload workflow to use pypa/gh-action-pypi-publish Signed-off-by: Jamie Hale --- .github/workflows/pythonpublish.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index 8211541fbe..c74ef590df 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -7,20 +7,23 @@ on: jobs: deploy: runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/acapy-agent + 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@v5 with: python-version: "3.x" - - name: Install dependencies + - name: Install build and publish dependencies run: | python -m pip install --upgrade pip pip install setuptools wheel twine poetry - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | poetry build - twine upload dist/* + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1