diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2b5d24a..1e2910c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,5 @@ -# This requires you to have a secret PYPI_TOKEN saved in your github environment +# Publishes to PyPI via trusted publishing (OIDC); no PYPI_TOKEN secret needed. +# Requires a trusted publisher on PyPI for this repo + publish.yml. name: Publish to PyPi @@ -8,7 +9,10 @@ on: jobs: publish: - runs-on: blacksmith-2vcpu-ubuntu-2404 + runs-on: ubuntu-latest # GitHub-hosted: supported env for pypa/gh-action-pypi-publish + permissions: + id-token: write # Required for PyPI trusted publishing + contents: read steps: #---------------------------------------------- # ----- checkout & setup python ----- @@ -54,9 +58,10 @@ jobs: #------------------------------ # ----- publish to pypi ----- #------------------------------ - - name: build & publish - run: | - poetry publish --build --username __token__ --password=${{ secrets.PYPI_TOKEN }} + - name: build + run: poetry build + - name: publish + uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3 #---------------------------------------------- # ----- mark SDK as released in Sideko ----- #----------------------------------------------