Skip to content

Commit 022ecd3

Browse files
committed
Add workflow release-pypi.yaml
Also remove the other release workflows to only release to Pypi
1 parent c6ee4a0 commit 022ecd3

File tree

9 files changed

+44
-152
lines changed

9 files changed

+44
-152
lines changed

.github/workflows/release-cpan.yaml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/release-github.yaml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/release-mvn.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/release-npm.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/release-nuget.yaml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/release-php.yaml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/workflows/release-pypi.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release Python
2+
3+
on:
4+
push:
5+
branches: [release/*]
6+
7+
jobs:
8+
release:
9+
name: Release
10+
runs-on: ubuntu-latest
11+
environment: Release
12+
permissions:
13+
id-token: write
14+
defaults:
15+
run:
16+
working-directory: python
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Python 3.10
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.10"
25+
26+
- name: Show Python version
27+
run: python --version
28+
29+
- name: Install Python package dependencies
30+
run: |
31+
python -m pip install -U pip setuptools wheel twine
32+
pip install -e .
33+
34+
- name: Build dist
35+
run: python setup.py sdist bdist_wheel
36+
37+
- name: Check dist
38+
run: twine check dist/*
39+
40+
- name: Publish package distributions to PyPI
41+
uses: pypa/gh-action-pypi-publish@release/v1
42+
with:
43+
packages-dir: python/dist/

.github/workflows/release-rubygem.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

python/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# coding: utf-8
2-
from distutils.core import setup
2+
from setuptools import setup
33
setup(name="gherkin-official",
44
packages=["gherkin", "gherkin.pickles", "gherkin.stream"],
55
version="26.0.2",

0 commit comments

Comments
 (0)