Upload Python Package #12
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 Python Package | |
| on: | |
| workflow_dispatch: | |
| # ref: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ | |
| jobs: | |
| build-oeq: | |
| name: Build distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: install dependencies, then build source tarball | |
| run: | | |
| cd openequivariance | |
| python3 -m pip install build --user | |
| python3 -m build --sdist | |
| - name: store the distribution packages | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: python-package-distributions | |
| path: openequivariance/dist/ | |
| pypi-publish: | |
| name: Upload release to PyPI | |
| runs-on: ubuntu-latest | |
| needs: build-oeq | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/openequivariance | |
| permissions: | |
| # IMPORTANT: this permission is mandatory for Trusted Publishing | |
| id-token: write | |
| steps: | |
| - name: download the distributions | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: python-package-distributions | |
| path: openequivariance/dist/ | |
| - name: publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| # ------------------------------------ | |
| build-oeq-extjax: | |
| name: Build distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: install dependencies, then build source tarball | |
| run: | | |
| cd openequivariance_extjax | |
| python3 -m pip install build --user | |
| python3 -m build --sdist | |
| - name: store the distribution packages | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: python-package-distributions | |
| path: openequivariance_extjax/dist/ | |
| pypi-publish-extjax: | |
| name: Upload release to PyPI | |
| runs-on: ubuntu-latest | |
| needs: build-oeq-extjax | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/openequivariance_extjax | |
| permissions: | |
| # IMPORTANT: this permission is mandatory for Trusted Publishing | |
| id-token: write | |
| steps: | |
| - name: download the distributions | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: python-package-distributions | |
| path: openequivariance_extjax/dist/ | |
| - name: publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |