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
| # This workflows will upload a Python Package using Twine when a release is created | |
| # Published via GitHub Actions as a PyPI Trusted Publisher. | |
| # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries | |
| # and: https://docs.pypi.org/trusted-publishers/ | |
| name: Upload Python Package | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| deploy: | |
| environment: release-pypi | |
| if: github.repository_owner == 'NatLabRockies' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.x' | |
| - name: Install dependencies and build package | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build twine | |
| python -m build | |
| twine check --strict dist/* | |
| - name: Publish package to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| verbose: True |