Skip to content

Commit ae519d7

Browse files
committed
Add release target for PyPi
1 parent cf869e7 commit ae519d7

File tree

3 files changed

+34
-13
lines changed

3 files changed

+34
-13
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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.12
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.12"
25+
26+
- name: Show Python version
27+
run: python --version
28+
29+
- uses: cucumber/action-publish-pypi@v3.0.0
30+
with:
31+
working-directory: "python"

.github/workflows/test-python.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ jobs:
3333
- macos-latest
3434

3535
steps:
36-
- uses: actions/checkout@v3
36+
- uses: actions/checkout@v4
3737
- name: Set up Python ${{ matrix.python-version }}
38-
uses: actions/setup-python@v4
38+
uses: actions/setup-python@v5
3939
with:
4040
python-version: ${{ matrix.python-version }}
4141
- name: Install dependencies
@@ -48,13 +48,3 @@ jobs:
4848
run: |
4949
tox
5050
codecov
51-
- name: Build checking
52-
working-directory: ./python
53-
if: "matrix.python-version == '3.11'"
54-
env:
55-
TWINE_USERNAME: __token__
56-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
57-
run: |
58-
python -m pip install --upgrade build twine
59-
python -m build
60-
twine check dist/*

python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ license = {text = "MIT"}
3131
maintainers = [
3232
{name = "Konstantin Goloveshko", email = "kostya.goloveshko@gmail.com"}
3333
]
34-
name = "cuke-messages"
34+
name = "cucumber-messages"
3535
readme = {file = "README.md", content-type = "text/markdown"}
3636
requires-python = ">=3.8"
3737
urls = {Repository = "https://github.com/cucumber/messages"}

0 commit comments

Comments
 (0)