Skip to content

Commit

Permalink
Set up continuous deployment for PyPI releases (#2342)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjstewart authored Oct 10, 2024
1 parent b8d4da7 commit c5c7fcc
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: deploy
on:
release:
types:
- published
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v4.2.1
- name: Set up python
uses: actions/setup-python@v5.2.0
with:
python-version: '3.12'
- name: Install pip dependencies
run: pip install build
- name: List pip dependencies
run: pip list
- name: Build project
run: python3 -m build
- name: Upload artifacts
uses: actions/upload-artifact@v4.4.3
with:
name: pypi-dist
path: dist/
pypi:
name: pypi
needs:
- build
environment:
name: pypi
url: https://pypi.org/p/torchgeo
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4.1.8
with:
name: pypi-dist
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@v1.10.3

0 comments on commit c5c7fcc

Please sign in to comment.