Skip to content

Commit

Permalink
Merge pull request #467 from OpenDataServices/automatic-pypi-releases
Browse files Browse the repository at this point in the history
Automatic pypi releases
  • Loading branch information
odscjames authored Dec 4, 2024
2 parents 3dcda5b + 1cad94d commit e29ab09
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Upload release to PyPI (Test & Live)
on:
push:
branches: [main]
release:
types: [published]

jobs:
pypi-publish:
name: Upload release to PyPI (Test & Live)
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/flattentool
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install --upgrade build
- run: python -m build --sdist --wheel
- name: Publish package distributions to TEST PyPI
if: github.event_name == 'push'
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
- name: Publish package distributions to LIVE PyPI
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ def run(self):
url="https://github.com/OpenDataServices/flatten-tool",
license="MIT",
description="Tools for generating CSV and other flat versions of the structured data",
long_description="",
long_description_content_type="text/plain",
install_requires=install_requires,
extras_require={"HTTP": ["requests"], "geo": ["shapely", "geojson"]},
cmdclass={
Expand Down

0 comments on commit e29ab09

Please sign in to comment.