From 95c932cbb3f9104acf1e5097c78adba13ed3bf35 Mon Sep 17 00:00:00 2001 From: Ju4tCode <42488585+yanyongyu@users.noreply.github.com> Date: Mon, 12 Feb 2024 13:57:26 +0000 Subject: [PATCH] :construction_worker: update release ci --- .github/workflows/release.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index add9b90..50cd81e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,6 +8,9 @@ on: jobs: release: runs-on: ubuntu-latest + permissions: + id-token: write + contents: write steps: - uses: actions/checkout@v3 @@ -25,10 +28,13 @@ jobs: if: steps.version.outputs.VERSION != steps.version.outputs.TAG_VERSION run: exit 1 - - name: Build and Publish Package - run: | - poetry build - poetry publish -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} - gh release upload --clobber ${{ steps.version.outputs.TAG_NAME }} dist/*.tar.gz dist/*.whl + - name: Build + run: poetry build + + - name: Publish a Python distribution to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + + - name: Upload Release Asset + run: gh release upload --clobber ${{ steps.version.outputs.TAG_NAME }} dist/*.tar.gz dist/*.whl env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}