Skip to content

Commit ed2d8f7

Browse files
authored
Python: Replace publish action (#313)
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 e53c50f commit ed2d8f7

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/release-pypi.yaml

Lines changed: 14 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,17 @@ 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: Build package
29+
run: |
30+
python -m pip install build twine
31+
python -m build
32+
twine check --strict dist/*
33+
34+
- name: Publish package distributions to PyPI
35+
uses: pypa/gh-action-pypi-publish@release/v1
2536
with:
26-
working-directory: "python"
37+
packages-dir: python/dist

0 commit comments

Comments
 (0)