Skip to content

Commit 6c5817a

Browse files
committed
Add workflow to publish op PyPI
1 parent 3869377 commit 6c5817a

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/publish.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish on PyPI
2+
on: push
3+
jobs:
4+
build:
5+
name: Build distribution
6+
runs-on: ubuntu-22.04
7+
steps:
8+
- uses: actions/checkout@v4
9+
- uses: actions/setup-python@v5
10+
with:
11+
python-version: 3.13
12+
- run: pip install build
13+
- run: python -m build -s
14+
- uses: actions/upload-artifact@v4
15+
with:
16+
name: python-gmp
17+
path: dist/
18+
publish-to-pypi:
19+
name: Publish distribution to PyPI
20+
if: startsWith(github.ref, 'refs/tags/')
21+
needs:
22+
- build
23+
runs-on: ubuntu-22.04
24+
environment:
25+
name: pypi
26+
url: https://pypi.org/p/python-gmp
27+
permissions:
28+
id-token: write
29+
steps:
30+
- uses: actions/download-artifact@v4
31+
with:
32+
name: python-gmp
33+
path: dist/
34+
- uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)