Skip to content

Commit de10dee

Browse files
committed
Add release workflow
1 parent 5eeb599 commit de10dee

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Upload Python Package
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
build:
10+
name: Build package
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-python@v5
15+
with:
16+
python-version: '3.x'
17+
- run: pip install --upgrade build
18+
- name: Build package
19+
run: pyproject-build
20+
- uses: actions/upload-artifact@v4
21+
with:
22+
name: dist
23+
path: dist
24+
overwrite: true
25+
if-no-files-found: error
26+
retention-days: 1
27+
28+
publish:
29+
name: Upload release to PyPI
30+
needs: build
31+
runs-on: ubuntu-latest
32+
permissions:
33+
id-token: write
34+
steps:
35+
- name: Download package
36+
uses: actions/download-artifact@v4
37+
with:
38+
name: dist
39+
path: dist
40+
- name: Publish package distributions to PyPI
41+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)