From d622c6c51d1a5992872a9b4b591b69b633258d42 Mon Sep 17 00:00:00 2001 From: juftin Date: Wed, 27 Mar 2024 23:39:32 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20missed=20release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publish.yaml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 868f931..61ba8b4 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -4,12 +4,18 @@ on: release: types: - published + workflow_dispatch: jobs: pypi-publish: name: PyPI - if: github.repository_owner == 'juftin' + if: github.repository_owner == 'juftin' && (github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.actor == 'juftin')) runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/llm-term + permissions: + id-token: write steps: - name: Check out the repository uses: actions/checkout@v4 @@ -28,7 +34,4 @@ jobs: run: | hatch build - name: Publish package on PyPI - uses: pypa/gh-action-pypi-publish@v1.8.10 - with: - user: __token__ - password: ${{ secrets.PYPI_TOKEN }} + uses: pypa/gh-action-pypi-publish@release/v1