Skip to content

TopoStats classes internally and for writing/reading HDF5 #92

TopoStats classes internally and for writing/reading HDF5

TopoStats classes internally and for writing/reading HDF5 #92

Workflow file for this run

name: Publish package to PyPi
# See https://docs.pypi.org/trusted-publishers/adding-a-publisher/
on:
pull_request:
branches:
- main
workflow_dispatch: # Uncomment line if you also want to trigger action manually
jobs:
build:
name: Build Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: 3.11
- name: Installing the package
run: |
pip3 install .[pypi]
- name: Build package
run: |
pip3 install --upgrade setuptools
export DEB_PYTHON_INSTALL_LAYOUT=deb_system
python -m build --no-isolation
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
publish-to-pypi:
name: Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
permissions:
id-token: write
environment:
name: pypi-publish
url: https://pypi.org/p/topostats
steps:
- name: Download all the dists
uses: actions/download-artifact@v5
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
# publish-to-testpypi:
# name: Publish Python 🐍 distribution 📦 to TestPyPI
# needs:
# - build
# runs-on: ubuntu-latest
# environment:
# name: testpypi
# url: https://test.pypi.org/p/topostats
# permissions:
# id-token: write # IMPORTANT: mandatory for trusted publishing
# steps:
# - name: Download all the dists
# uses: actions/download-artifact@v5
# with:
# name: python-package-distributions
# path: dist/
# - name: Publish distribution 📦 to TestPyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository-url: https://test.pypi.org/legacy/