Skip to content

Commit 0d9dc47

Browse files
authored
github action added to publish python package in to pypi (#14)
* github action added to publish python package in to pypi * removed permission from root
1 parent ed03207 commit 0d9dc47

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/pypi-publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Publish Python Package
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
pypi-publish:
10+
name: upload release to PyPI
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
id-token: write
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
ref: ${{ github.event.release.tag_name }}
19+
20+
- name: Setup PDM
21+
uses: pdm-project/setup-pdm@v4
22+
with:
23+
python-version: 3.9.6
24+
version: 2.12.3
25+
26+
- name: Publish package distributions to PyPI
27+
run: pdm publish

0 commit comments

Comments
 (0)