Skip to content

Commit 93860ab

Browse files
authored
[Python] Use a trusted publisher to release to Pypi. (#263)
* [Python] Use a trusted publisher to release to Pypi. Pypi now requires 2FA and the a trusted publisher is the recommendation for automated releases. The workflow is renamed release-pypi.yaml to match the trusted publisher definition in for cucumber-expression in Pypi. * Update the Changelog.md
1 parent 8c2b2da commit 93860ab

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

.github/workflows/release-python.yml renamed to .github/workflows/release-pypi.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,8 @@ jobs:
3232
- name: Build
3333
run: poetry build
3434

35-
- name: Config for PyPI release
36-
run: |
37-
poetry config pypi-token.pypi "${{ secrets.PYPI_TOKEN }}"
38-
39-
- name: Publish
40-
run: |
41-
poetry publish
35+
- name: Publish package distributions to PyPI
36+
uses: pypa/gh-action-pypi-publish@release/v1
37+
with:
38+
packages-dir: python/dist/
39+
skip-existing: true

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99
### Changed
10+
- [Python] Updated the release workflow to use trusted publisher ([#263](https://github.com/cucumber/cucumber-expressions/pull/263))
1011
- [Ruby] Added subsidiary rubocop gems (RSpec/Rake/Performance), and did some initial refactoring ([#247](https://github.com/cucumber/cucumber-expressions/pull/247))
1112
- Additional information for alternation inside optional error message on how to fix ([#260](https://github.com/cucumber/cucumber-expressions/pull/260))
1213

0 commit comments

Comments
 (0)