File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -135,6 +135,9 @@ jobs:
135135
136136 build-libuuu-wrapper :
137137 runs-on : ubuntu-latest
138+ permissions :
139+ id-token : write # Required for trusted publishing
140+ contents : read # Required for actions/checkout
138141 needs : create-universal-dylib
139142 steps :
140143 - name : Checkout uuu repository
@@ -177,16 +180,12 @@ jobs:
177180 name : reports
178181 path : ./wrapper/reports/*
179182
180- - name : Release package to pypi
181- if : github.ref_type == 'tag'
182- env :
183- TWINE_USERNAME : ${{ secrets.TWINE_USERNAME }}
184- TWINE_PASSWORD : ${{ secrets.TWINE_PASSWORD }}
185- # TWINE_REPOSITORY_URL: ${{ secrets.TWINE_REPOSITORY_URL }}
186- working-directory : ./wrapper
187- run : |
188- twine --no-color check dist/*
189- twine --no-color upload --repository pypi dist/*
183+ - name : Publish to PyPI
184+ uses : pypa/gh-action-pypi-publish@release/v1
185+ with :
186+ # This tells the action to use Trusted Publishing with OIDC
187+ skip-existing : true # Optional: don’t fail if the same version is already uploaded
188+ packages-dir : ./wrapper/dist
190189
191190 - name : Upload the dist folder
192191 uses : actions/upload-artifact@v4
You can’t perform that action at this time.
0 commit comments