Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ jobs:
FOLDER: docs/_build/html # The folder the action should deploy.
Publish:
runs-on: ubuntu-latest
# PyPI trusted publishing: uploads accepted only from this workflow in the
# pypi environment (limited to master). No stored token.
environment: pypi
permissions:
contents: write # publish-git-tag.sh pushes the version tag
id-token: write
if: |
(github.repository == 'PolicyEngine/policyengine-canada')
&& (github.event.head_commit.message == 'Update PolicyEngine Canada')
Expand All @@ -111,8 +117,6 @@ jobs:
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI }}
skip_existing: true
Deploy:
if: |
Expand Down
1 change: 1 addition & 0 deletions changelog.d/trusted-publishing.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Publish to PyPI with trusted publishing (OIDC) from the `pypi` environment instead of a stored API token.
Loading