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 }}