From 3d7f495b6b7f9b3378309005263172a39930497f Mon Sep 17 00:00:00 2001 From: Matthew Printz Date: Wed, 7 Aug 2024 11:46:37 -0500 Subject: [PATCH] Update publish to use trusted publisher authentication --- .github/workflows/publish.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8457563..1572c0b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,7 +10,10 @@ jobs: environment: publish # No strategeies needed for publish steps: - - uses: actions/checkout@v1 + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.event.workflow_run.head_branch }} - uses: actions/setup-python@v4 with: python-version: '3.10' @@ -20,8 +23,8 @@ jobs: poetry-version: 1.4.1 - name: Create environment run: poetry install - - name: Publish to PyPi - env: - POETRY_PYPI_TOKEN_PYPI: ${{ secrets.POETRY_PYPI_TOKEN_PYPI }} - run: poetry publish --build - + - name: Build + run: poetry build + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 +