Publish to PyPI #93
Workflow file for this run
This file contains 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: | |
jobs: | |
publish-pypi: | |
if: | | |
github.event_name == 'workflow_dispatch' | |
||( github.event.workflow_run.conclusion == 'success' | |
&& github.repository == 'opendatacube/odc-geo') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
id: wheels_cache | |
with: | |
path: ./wheels | |
key: wheels-${{ github.sha }} | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- 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 | |
if: github.event_name == 'workflow_dispatch' || github.ref_type == 'tag' | |
env: | |
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
TWINE_USERNAME: __token__ | |
run: | | |
ls wheels/clean/ | |
twine upload --non-interactive --skip-existing wheels/clean/* |