From 9eca36779336d4ac914e0f17c62b60161e51f34c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Rasmusson?= Date: Mon, 15 Jan 2024 11:29:23 +0100 Subject: [PATCH] [Python] Add workflow release-pypi.yaml (#245) * [Python] Add workflow release-pypi.yaml Also remove the invalid classifier Framework :: Gherkin from pyproject.toml * Update Changelog.md --- .github/workflows/release-pypi.yaml | 44 +++++++++++++++++++++++++++++ CHANGELOG.md | 1 + python/pyproject.toml | 1 - 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release-pypi.yaml diff --git a/.github/workflows/release-pypi.yaml b/.github/workflows/release-pypi.yaml new file mode 100644 index 00000000..5b2e2eea --- /dev/null +++ b/.github/workflows/release-pypi.yaml @@ -0,0 +1,44 @@ +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: + packages-dir: python/dist/ + skip-existing: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 350a5201..d31ca95c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +- [Python] added release workflow to release to Pypi ([#245](https://github.com/cucumber/ci-environment/pull/245)) ## [10.0.0] - 2023-11-16 ### Added diff --git a/python/pyproject.toml b/python/pyproject.toml index 051cbce0..2d60f2d3 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -8,7 +8,6 @@ authors = [ ] classifiers = [ "Development Status :: 4 - Beta", - "Framework :: Gherkin", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: POSIX",