Skip to content

Commit 5e95c58

Browse files
committed
添加 pypi 脚本
1 parent bb6ca5f commit 5e95c58

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/publish.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Upload Python Package
2+
3+
on: workflow_dispatch
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
branch: [master, PyQt6, Pyside2, PySide6]
14+
15+
steps:
16+
- name: Checkout branch
17+
uses: actions/checkout@v4
18+
with:
19+
ref: ${{ matrix.branch }}
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v3
23+
with:
24+
python-version: '3.8'
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install build
30+
31+
- name: Build package
32+
run: python -m build
33+
34+
- name: Publish package
35+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
36+
with:
37+
user: __token__
38+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)