Skip to content

Commit a87c22c

Browse files
authored
added a python publish workflow (#1281)
* added a python publish workflow Signed-off-by: Zhang Jun <jzhang533@gmail.com> * minor Signed-off-by: Zhang Jun <jzhang533@gmail.com> --------- Signed-off-by: Zhang Jun <jzhang533@gmail.com>
1 parent 2c25994 commit a87c22c

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/python-publish.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
deploy:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.x'
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install -U wheel
25+
pip install -U setuptools
26+
pip install -r requirements.txt
27+
28+
- name: Build package
29+
run: python setup.py bdist_wheel
30+
- name: Publish package
31+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
32+
with:
33+
user: __token__
34+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)