Skip to content

Commit 3b7f9d0

Browse files
authored
Create pypi-publish.yml
1 parent d31aa3c commit 3b7f9d0

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/pypi-publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish PyPi Package
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check out repository
15+
uses: actions/checkout@v3
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v3
19+
with:
20+
python-version: '3.x'
21+
22+
- name: Install dependencies and Publish package
23+
run: |
24+
python -m pip install --upgrade pip
25+
python -m pip install --upgrade build
26+
python -m pip install --upgrade twine
27+
cd /PyPI/Package
28+
python -m build
29+
python -m twine upload --repository pypi dist/* --username __token__ --password ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)