Publish to PyPI #68
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: Publish to PyPI | |
| on: | |
| workflow_dispatch: | |
| # When a PR is updated, cancel the jobs from the previous version. Merges | |
| # do not define head_ref, so use run_id to never cancel those jobs. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| publish-pypi: | |
| if: | | |
| github.repository == 'opendatacube/odc-stac' | |
| timeout-minutes: 15 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Download wheels from artifacts | |
| uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 | |
| with: | |
| name: python-wheels | |
| path: ./wheels/clean | |
| - name: Setup Python | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: "3.10" | |
| - name: Install Twine | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install --upgrade setuptools | |
| python -m pip install --upgrade \ | |
| toml \ | |
| wheel \ | |
| twine | |
| python -m pip freeze | |
| - name: Upload to PyPI | |
| env: | |
| TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
| TWINE_USERNAME: __token__ | |
| run: | | |
| ls wheels/clean/ | |
| twine upload --non-interactive --skip-existing wheels/clean/* |