Skip to content

Commit 4b26643

Browse files
committed
Create publish.yml
1 parent 4f5cb49 commit 4b26643

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/publish.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
name: Publish Python Package
3+
4+
on:
5+
release:
6+
types: [published]
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
build:
13+
name: Build distribution
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Buld the distribution package
19+
run: pipx run build
20+
- name: Store the distribution package
21+
uses: actions/upload-artifact@v4
22+
with:
23+
name: dist
24+
path: dist/
25+
26+
publish:
27+
name: Upload release to PyPI
28+
runs-on: ubuntu-latest
29+
permissions:
30+
id-token: write
31+
32+
steps:
33+
- name: Download the dist
34+
uses: actions/download-artifact@v4
35+
with:
36+
name: dist
37+
path: dist/
38+
- name: Publish package distributions to PyPI
39+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)