Update httomo_backends_pypi_publish.yml #40
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Upload Package to PyPI when "v" tag is pushed | |
| # Run the workflow whenever a tag beginning with `v` is pushed to any branch | |
| on: | |
| push: | |
| tags: | |
| - v* | |
| jobs: | |
| pypi-publish: | |
| name: Publish release to PyPI | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/httomo-backends | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.12" | |
| - name: Setup conda | |
| uses: mamba-org/setup-micromamba@v2 | |
| with: | |
| post-cleanup: 'all' | |
| init-shell: bash | |
| - name: Install dependencies | |
| run: | | |
| micromamba install -c conda-forge tomopy==1.15 | |
| python -m pip install pyyaml setuptools wheel build httomolib | |
| python -m pip install --no-deps httomolibgpu | |
| micromamba list | |
| - name: Generate yaml templates | |
| run: | | |
| python ./httomo_backends/scripts/yaml_templates_generator.py -i ./httomo_backends/methods_database/packages/backends/tomopy/tomopy_modules.yaml -o ./httomo_backends/yaml_templates/tomopy | |
| python ./httomo_backends/scripts/yaml_unsupported_tomopy_remove.py -t ./httomo_backends/yaml_templates/tomopy -l ./httomo_backends/methods_database/packages/backends/tomopy/tomopy.yaml | |
| python ./httomo_backends/scripts/yaml_templates_generator.py -i ./httomo_backends/methods_database/packages/backends/httomolib/httomolib_modules.yaml -o ./httomo_backends/yaml_templates/httomolib | |
| python ./httomo_backends/scripts/yaml_templates_generator.py -i ./httomo_backends/methods_database/packages/backends/httomolibgpu/httomolibgpu_modules.yaml -o ./httomo_backends/yaml_templates/httomolibgpu | |
| - name: Build package | |
| run: | | |
| python -m build | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |