Skip to content

Commit eaa6f77

Browse files
authored
Merge pull request #20 from scientificcomputing/pypi
Add workflow to publish to pypi
2 parents adfdcb6 + 71b791a commit eaa6f77

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/pypi.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Release
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
dist:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v6
10+
11+
- name: Build SDist and wheel
12+
run: pipx run build
13+
14+
- uses: actions/upload-artifact@v5
15+
with:
16+
path: dist/*
17+
18+
- name: Check metadata
19+
run: pipx run twine check dist/*
20+
21+
publish:
22+
needs: [dist]
23+
runs-on: ubuntu-latest
24+
if: startsWith(github.ref, 'refs/tags')
25+
environment: pypi
26+
permissions:
27+
id-token: write
28+
29+
steps:
30+
- uses: actions/download-artifact@v6
31+
with:
32+
name: artifact
33+
path: dist
34+
35+
- uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)