Skip to content

Commit c16be67

Browse files
committed
add release workflow
1 parent a6b1cd5 commit c16be67

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Release to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- uses: actions/setup-python@v5
14+
with:
15+
python-version: "3.12"
16+
17+
- name: Install build dependencies
18+
run: python -m pip install --upgrade pip build
19+
20+
- name: Build package
21+
run: python -m build
22+
23+
- uses: actions/upload-artifact@v4
24+
with:
25+
name: dist
26+
path: dist/
27+
28+
publish:
29+
needs: build
30+
runs-on: ubuntu-latest
31+
environment: pypi
32+
permissions:
33+
id-token: write
34+
steps:
35+
- uses: actions/download-artifact@v4
36+
with:
37+
name: dist
38+
path: dist/
39+
40+
- uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)