chore: add uv.lock file #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish PyPi | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' # 仅匹配类似 v1.0.0 的标签 | |
| permissions: | |
| id-token: write # 允许请求 OIDC JWT | |
| contents: read # 允许 actions/checkout 使用 | |
| jobs: | |
| release-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| uv sync | |
| - name: Build release distributions | |
| run: | | |
| uv build | |
| - name: Upload release distributions | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-dists | |
| path: dist/ | |
| pypi-publish: | |
| runs-on: ubuntu-latest | |
| needs: release-build | |
| steps: | |
| - name: Retrieve release distributions | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: release-dists | |
| path: dist/ | |
| - name: Publish release distributions to PyPI | |
| uses: pypa/[email protected] | |
| with: | |
| password: ${{ secrets.PYPI_TOKEN }} |