From 25e29034df31bdfb4b96b3548944df6fad901d37 Mon Sep 17 00:00:00 2001 From: "shanhaikang.shk" Date: Wed, 25 Sep 2024 21:30:11 +0800 Subject: [PATCH] change publish.yml Signed-off-by: shanhaikang.shk --- .github/workflows/python-publish.yml | 29 +++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 6e42205..e63b3ed 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -16,7 +16,7 @@ permissions: contents: read jobs: - deploy: + release-build: runs-on: ubuntu-latest @@ -39,7 +39,26 @@ jobs: - name: Build package run: | poetry build - - - name: Publish release distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - + + - name: upload windows dists + uses: actions/upload-artifact@v4 + with: + name: release-dists + path: dist/ + + pypi-publish: + runs-on: ubuntu-latest + needs: + - release-build + permissions: + id-token: write + + steps: + - name: Retrieve release distributions + uses: actions/download-artifact@v4 + with: + name: release-dists + path: dist/ + + - name: Publish release distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1