Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release Python package

on:
workflow_run:
workflows: [tests]
branches: [main]
types: [completed]

jobs:
release:
needs: test
runs-on: ubuntu-latest
name: Release package to PyPi
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@master
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- name: Build and release 📦 to PyPI
with:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
tox -e release

7 changes: 4 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
- push

jobs:
build:
test:
runs-on: ubuntu-latest
name: Docker | GDAL=${{ matrix.gdal-version }} | python=${{ matrix.python-version }}
container: osgeo/gdal:ubuntu-full-${{ matrix.gdal-version }}
Expand Down Expand Up @@ -45,9 +45,10 @@ jobs:
python -m pip install tox tox-gh-actions
- name: Lint with tox
run: tox -e lint
# - name: Format with tox
# run: tox -e format
- name: Format with tox
run: tox -e format
- name: Flake8 with tox
run: tox -e flake8
- name: Test with tox
run: tox -e test