Commit d5886c689c
Verified · cmc
Layout: unified · split
.github/workflows/release.yml added +36
| @@ -0,0 +1,36 @@ | ||
| 1 | name: Release | |
| 2 | ||
| 3 | on: | |
| 4 | push: | |
| 5 | tags: | |
| 6 | - "v*" | |
| 7 | ||
| 8 | jobs: | |
| 9 | build: | |
| 10 | runs-on: ubuntu-latest | |
| 11 | steps: | |
| 12 | - uses: actions/checkout@v5 | |
| 13 | - name: Install uv | |
| 14 | uses: astral-sh/setup-uv@v6 | |
| 15 | - name: Build | |
| 16 | run: uv build | |
| 17 | - name: Check | |
| 18 | run: uvx twine check dist/* | |
| 19 | - uses: actions/upload-artifact@v4 | |
| 20 | with: | |
| 21 | name: dist | |
| 22 | path: dist/ | |
| 23 | ||
| 24 | publish: | |
| 25 | needs: build | |
| 26 | runs-on: ubuntu-latest | |
| 27 | environment: pypi | |
| 28 | permissions: | |
| 29 | id-token: write | |
| 30 | steps: | |
| 31 | - uses: actions/download-artifact@v4 | |
| 32 | with: | |
| 33 | name: dist | |
| 34 | path: dist/ | |
| 35 | - name: Publish to PyPI | |
| 36 | uses: pypa/gh-action-pypi-publish@release/v1 | |