Skip to content

Commit cddf253

Browse files
committed
Python: Replace publish action
Replaces `cucumber/action-publish-pypi` with `pypa/gh-action-pypi-publish@release/v1`. The motivation for using actions in the cucumber org is to ensure that we do not hand release tokens to untrusted code. As the party publishing our python packages, the Python Package Authority can be trusted. Additionally, their action uses trusted publishers which authorizes GitHub with OIDC so no long-lived tokens are used.
1 parent aa12196 commit cddf253

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

.github/workflows/release-pypi.yaml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Release Python
22

33
on:
44
push:
5-
branches: [release/*]
5+
branches: [ release/* ]
66

77
jobs:
88
release:
@@ -21,6 +21,16 @@ jobs:
2121
uses: actions/setup-python@v5
2222
with:
2323
python-version: "3.10"
24-
- uses: cucumber/[email protected]
24+
25+
- name: Show Python version
26+
run: python --version
27+
28+
- name: Install Python package dependencies
29+
run: |
30+
python -m pip install build twine
31+
python -m build
32+
twine check --strict dist/*
33+
- name: Publish package distributions to PyPI
34+
uses: pypa/gh-action-pypi-publish@release/v1
2535
with:
26-
working-directory: "python"
36+
packages-dir: python/dist

0 commit comments

Comments
 (0)