Skip to content

Commit 1c6290b

Browse files
committed
🔧 action: add python publish workflow
1 parent 0b8503c commit 1c6290b

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
environment: Python Publish
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Set up Python
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: '3.x'
17+
- name: Install dependencies
18+
run: |
19+
python3 -m pip install --upgrade pip
20+
python3 -m pip install build
21+
- name: Build package
22+
run: python3 -m build
23+
- name: Publish package
24+
uses: pypa/gh-action-pypi-publish@release/v1
25+
with:
26+
user: __token__
27+
password: ${{ secrets.PYPI_API_TOKEN }}
28+
verbose: true
29+
print_hash: true

0 commit comments

Comments
 (0)