Skip to content

Commit e29ab09

Browse files
author
James (ODSC)
authored
Merge pull request #467 from OpenDataServices/automatic-pypi-releases
Automatic pypi releases
2 parents 3dcda5b + 1cad94d commit e29ab09

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

.github/workflows/pypi.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Upload release to PyPI (Test & Live)
2+
on:
3+
push:
4+
branches: [main]
5+
release:
6+
types: [published]
7+
8+
jobs:
9+
pypi-publish:
10+
name: Upload release to PyPI (Test & Live)
11+
runs-on: ubuntu-latest
12+
environment:
13+
name: pypi
14+
url: https://pypi.org/p/flattentool
15+
permissions:
16+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.12'
22+
- run: pip install --upgrade build
23+
- run: python -m build --sdist --wheel
24+
- name: Publish package distributions to TEST PyPI
25+
if: github.event_name == 'push'
26+
uses: pypa/gh-action-pypi-publish@release/v1
27+
with:
28+
repository-url: https://test.pypi.org/legacy/
29+
skip-existing: true
30+
- name: Publish package distributions to LIVE PyPI
31+
if: github.event_name == 'release'
32+
uses: pypa/gh-action-pypi-publish@release/v1

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ def run(self):
5151
url="https://github.com/OpenDataServices/flatten-tool",
5252
license="MIT",
5353
description="Tools for generating CSV and other flat versions of the structured data",
54+
long_description="",
55+
long_description_content_type="text/plain",
5456
install_requires=install_requires,
5557
extras_require={"HTTP": ["requests"], "geo": ["shapely", "geojson"]},
5658
cmdclass={

0 commit comments

Comments
 (0)