We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a6bf71b + 080abca commit e0ae984Copy full SHA for e0ae984
.github/workflows/publish.yml
@@ -0,0 +1,31 @@
1
+name: Publish to PyPI
2
+
3
+on:
4
+ push:
5
+ tags:
6
+ - 'v*' # 当推送以 'v' 开头的标签时触发
7
8
+jobs:
9
+ build-and-publish:
10
+ runs-on: windows-latest # 使用 Windows 环境
11
+ steps:
12
+ - name: Checkout code
13
+ uses: actions/checkout@v4
14
15
+ - name: Set up Python
16
+ uses: actions/setup-python@v4
17
+ with:
18
+ python-version: '3.x'
19
20
+ - name: Install uv
21
+ run: |
22
+ powershell -c "irm https://astral.sh/uv/install.sh | iex"
23
+ echo "$env:USERPROFILE\.cargo\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
24
25
+ - name: Build package
26
+ run: uv build
27
28
+ - name: Publish to PyPI
29
+ env:
30
+ UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }} # 使用 UV_PUBLISH_TOKEN 替代 TWINE_PASSWORD
31
+ run: uv publish dist/*
0 commit comments