Skip to content

Commit

Permalink
[Python] Add a workflow to release to PyPi (#145)
Browse files Browse the repository at this point in the history
* Add the workflow release-pypi.yaml to release to Pypi

Also add the pyproject.toml to specify the build backend, and
remove the tasks/release.py as releases should be make using
GitHub actions.

* Update Changelog.md
  • Loading branch information
brasmusson authored Jan 7, 2024
1 parent cdd2146 commit 82911f6
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 208 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/release-pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release Python

on:
push:
branches: [release/*]

jobs:
release:
name: Release
runs-on: ubuntu-latest
environment: Release
permissions:
id-token: write
defaults:
run:
working-directory: python
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Show Python version
run: python --version

- name: Install Python package dependencies
run: |
python -m pip install -U pip setuptools wheel twine build
pip install -e .
- name: Build dist
run: python -m build .

- name: Check dist
run: twine check dist/*

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- [Python] Support the feature of escaping also in Python ([#144](https://github.com/cucumber/tag-expressions/pull/144))

### Fixed
- [Python] Added workflow to release to Pypi ([#145](https://github.com/cucumber/tag-expressions/pull/145))
- [Ruby] Fixed up around 75% of all rubocop offenses ([#138](https://github.com/cucumber/tag-expressions/pull/138))

## [6.0.0] - 2023-10-13
Expand Down
5 changes: 5 additions & 0 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[build-system]
# These are the assumed default build requirements from pip:
# https://pip.pypa.io/en/stable/reference/pip/#pep-517-and-518-support
requires = ["setuptools>=43.0.0", "wheel"]
build-backend = "setuptools.build_meta"
208 changes: 0 additions & 208 deletions python/tasks/release.py

This file was deleted.

0 comments on commit 82911f6

Please sign in to comment.