Skip to content

Commit b233bdb

Browse files
committed
Rename deploy.yml to publish.yml, use production environment, OIDC trusted publishing
- Rename workflow file to publish.yml (matches trusted publisher config) - Rename workflow to Publish (PyPI matches on workflow filename) - Switch environment: pypi -> production (matches trusted publisher config) - Use twine --trusted-publishing=always instead of API token
1 parent 339f93a commit b233bdb

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy
1+
name: Publish
22

33
on:
44
release:
@@ -36,7 +36,7 @@ jobs:
3636
needs: [test]
3737
runs-on: ${{ github.repository_owner == 'twilio' && 'ubuntu-x64' || 'ubuntu-latest' }}
3838
if: github.repository_owner == 'twilio'
39-
environment: pypi
39+
environment: production
4040
permissions:
4141
contents: read
4242
id-token: write
@@ -73,8 +73,5 @@ jobs:
7373

7474
- name: Publish to PyPI
7575
run: |
76-
pip install twine
77-
twine upload --repository pypi dist/*
78-
env:
79-
TWINE_USERNAME: __token__
80-
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
76+
pip install "twine>=5.0"
77+
twine upload --repository pypi --trusted-publishing=always dist/*

0 commit comments

Comments
 (0)