v1.1.1 #2
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: Upload package to PyPI | |
on: | |
release: | |
types: [created] | |
jobs: | |
publish: | |
name: Publish to PyPI | |
runs-on: ubuntu-latest | |
permissions: | |
contents: 'read' | |
id-token: 'write' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install system packages | |
run: sudo apt-get install -y libgdal-dev | |
- name: Setup Environment Variables | |
run: echo "GDAL_CONFIG=/usr/bin/gdal-config" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip build twine | |
pip install GDAL==`gdal-config --version` | |
- name: Build | |
run: | | |
python -m build --sdist --wheel . | |
- name: Check the built archives | |
run: | | |
twine check dist/* | |
pip install dist/*.whl | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e | |
with: | |
password: ${{ secrets.pypi_token }} | |
repository_url: https://upload.pypi.org/legacy/ | |
verify_metadata: true |