orix 0.14.0 #35
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
| ## | |
| ## Copyright 2018-2025 the orix developers | |
| ## | |
| ## This file is part of orix. | |
| ## | |
| ## orix is free software: you can redistribute it and/or modify | |
| ## it under the terms of the GNU General Public License as published by | |
| ## the Free Software Foundation, either version 3 of the License, or | |
| ## (at your option) any later version. | |
| ## | |
| ## orix is distributed in the hope that it will be useful, | |
| ## but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| ## GNU General Public License for more details. | |
| ## | |
| ## You should have received a copy of the GNU General Public License | |
| ## along with orix. If not, see <http://www.gnu.org/licenses/>. | |
| ## | |
| # This workflow runs when a tagged release is created or it is triggered manually. | |
| # For more information see: | |
| # - Python docs: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ | |
| # - GitHub action: https://github.com/marketplace/actions/pypi-publish | |
| # - GitHub docs: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries | |
| # The source distribution (sdist) is built with the `build` package | |
| # (https://pypa-build.readthedocs.io/en/stable/index.html). | |
| # The sdist is uploaded to: | |
| # - TestPyPI whenever the workflow is run | |
| # - PyPI when the current commit is tagged | |
| name: Upload to PyPI | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| # IMPORTANT: this permission is mandatory for trusted publishing | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install -U pip | |
| python -m pip install build | |
| - name: Build package | |
| run: | | |
| python -m build | |
| - name: Publish package to TestPyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| continue-on-error: true | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ | |
| attestations: false | |
| - name: Publish package to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |