Skip to content

Commit 2628391

Browse files
committed
Enable continuous pypi publishing
1 parent 60a2d71 commit 2628391

5 files changed

Lines changed: 55 additions & 6 deletions

File tree

.github/workflows/publish.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-python@v5
14+
with:
15+
python-version: "3.12"
16+
- run: pip install build
17+
- run: python -m build
18+
- uses: actions/upload-artifact@v4
19+
with:
20+
name: dist
21+
path: dist/
22+
23+
publish:
24+
needs: build
25+
runs-on: ubuntu-latest
26+
environment:
27+
name: pypi
28+
url: https://pypi.org/project/pygexml/
29+
permissions:
30+
id-token: write
31+
steps:
32+
- uses: actions/download-artifact@v4
33+
with:
34+
name: dist
35+
path: dist/
36+
- uses: pypa/gh-action-pypi-publish@release/v1

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ env
1010

1111
# Python stuff
1212
__pycache__
13+
dist
14+
build
1315
*.egg-info
1416
.mypy_cache
1517
.pytest_cache

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ Copyright (c) 2026 [Mirko Westermeier][gh-memowe] (SCDH, University of Münster)
7878
Released under the [MIT License](LICENSE).
7979

8080
[page-xml]: https://github.com/PRImA-Research-Lab/PAGE-XML
81-
[workflows]: https://github.com/SCDH/pygexml/actions/workflows/ci.yml
82-
[workflows-badge]: https://github.com/SCDH/pygexml/actions/workflows/ci.yml/badge.svg
81+
[workflows]: https://github.com/SCDH/pygexml/actions/workflows/checks_tests_docs.yml
82+
[workflows-badge]: https://github.com/SCDH/pygexml/actions/workflows/checks_tests_docs.yml/badge.svg
8383
[hypothesis]: https://hypothesis.readthedocs.io
8484
[api-docs]: https://scdh.github.io/pygexml
8585
[api-docs-strategies]: https://scdh.github.io/pygexml/pygexml/strategies.html

pyproject.toml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,30 @@ build-backend = "setuptools.build_meta"
55
[project]
66
name = "pygexml"
77
version = "0.1.2"
8+
description = "A minimal Python wrapper around the PAGE-XML format for OCR output"
9+
readme = "README.md"
10+
license = "MIT"
811
requires-python = ">=3.12"
12+
authors = [
13+
{ name = "Mirko Westermeier", email = "mirko.westermeier@uni-muenster.de" },
14+
]
915
dependencies = [
1016
"lxml",
11-
"lxml-stubs",
12-
"hypothesis",
1317
]
1418

19+
[project.urls]
20+
Homepage = "https://github.com/SCDH/pygexml"
21+
Repository = "https://github.com/SCDH/pygexml"
22+
Documentation = "https://scdh.github.io/pygexml"
23+
Issues = "https://github.com/SCDH/pygexml/issues"
24+
1525
[tool.setuptools.package-data]
1626
pygexml = ["py.typed"]
1727

1828
[project.optional-dependencies]
19-
dev = ["mypy", "pyright", "black"]
20-
test = ["pytest"]
29+
strategies = ["hypothesis"]
30+
dev = ["mypy", "pyright", "black", "lxml-stubs"]
31+
test = ["pytest", "hypothesis"]
2132
docs = ["pdoc"]
2233

2334
[tool.setuptools]

0 commit comments

Comments
 (0)