Skip to content

Commit

Permalink
Add release target for PyPi
Browse files Browse the repository at this point in the history
  • Loading branch information
elchupanebrej committed Sep 7, 2024
1 parent cf869e7 commit ae519d7
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 13 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release-pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
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.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

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

- uses: cucumber/[email protected]
with:
working-directory: "python"
14 changes: 2 additions & 12 deletions .github/workflows/test-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ jobs:
- macos-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -48,13 +48,3 @@ jobs:
run: |
tox
codecov
- name: Build checking
working-directory: ./python
if: "matrix.python-version == '3.11'"
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python -m pip install --upgrade build twine
python -m build
twine check dist/*
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ license = {text = "MIT"}
maintainers = [
{name = "Konstantin Goloveshko", email = "[email protected]"}
]
name = "cuke-messages"
name = "cucumber-messages"
readme = {file = "README.md", content-type = "text/markdown"}
requires-python = ">=3.8"
urls = {Repository = "https://github.com/cucumber/messages"}
Expand Down

0 comments on commit ae519d7

Please sign in to comment.