chore(release): 0.3.0 #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: release | |
| # 推送 v* tag 触发:测试通过后,经 PyPI Trusted Publishing(OIDC)发布。 | |
| # 不用任何长期 token —— 凭证由 GitHub OIDC 与 PyPI 的可信发布绑定换取。 | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: astral-sh/setup-uv@v8 | |
| - run: uv run --extra dev pytest -q | |
| publish: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # Trusted Publishing 必需:换取 OIDC 令牌 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: astral-sh/setup-uv@v8 | |
| - name: Build | |
| run: | | |
| rm -rf dist | |
| uv build | |
| - name: Publish to PyPI (Trusted Publishing) | |
| uses: pypa/gh-action-pypi-publish@release/v1 |