From 8ad445020e7055b7b7a7cb466d97512f14a6fa56 Mon Sep 17 00:00:00 2001 From: Michaelyin Date: Tue, 7 Nov 2023 12:46:20 +0800 Subject: [PATCH] use PYPI_API_TOKEN --- .github/workflows/python-publish.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 2136652..9b5b2c6 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -9,10 +9,8 @@ name: Upload Python Package on: - pull_request: - push: - branches: - - main + release: + types: [published] permissions: contents: read @@ -27,9 +25,13 @@ jobs: - name: Set up Python uses: actions/setup-python@v3 with: - python-version: '3.x' + python-version: '3.10' - name: Install dependencies run: | python -m pip install poetry - name: Build package run: poetry build + - name: Publish package + uses: pypa/gh-action-pypi-publish@v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }}