Skip to content

Commit 53a1e9b

Browse files
committed
Set up continuous deployment for PyPI releases (#2342)
1 parent 34c588b commit 53a1e9b

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/deploy.yaml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: deploy
2+
on:
3+
release:
4+
types:
5+
- published
6+
jobs:
7+
build:
8+
name: build
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Clone repo
12+
uses: actions/[email protected]
13+
- name: Set up python
14+
uses: actions/[email protected]
15+
with:
16+
python-version: '3.12'
17+
- name: Install pip dependencies
18+
run: pip install build
19+
- name: List pip dependencies
20+
run: pip list
21+
- name: Build project
22+
run: python3 -m build
23+
- name: Upload artifacts
24+
uses: actions/[email protected]
25+
with:
26+
name: pypi-dist
27+
path: dist/
28+
pypi:
29+
name: pypi
30+
needs:
31+
- build
32+
environment:
33+
name: pypi
34+
url: https://pypi.org/p/torchgeo
35+
permissions:
36+
id-token: write
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Download artifacts
40+
uses: actions/[email protected]
41+
with:
42+
name: pypi-dist
43+
path: dist/
44+
- name: Publish to PyPI
45+
uses: pypa/[email protected]

0 commit comments

Comments
 (0)