Repository navigation
[python] Release wheels #19
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 wheels | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: Version to release (e.g. 1.2.3) | |
| required: true | |
| type: string | |
| jobs: | |
| create-tag: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Create and push release tag | |
| run: | | |
| git tag "v${{ inputs.version }}" | |
| git push origin "v${{ inputs.version }}" | |
| release-wheel: | |
| runs-on: ubuntu-latest | |
| needs: create-tag | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| ref: "v${{ inputs.version }}" | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Build wheel | |
| run: make wheel | |
| - name: Upload wheel artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheel | |
| path: dist/*.whl | |
| publish-release: | |
| runs-on: ubuntu-latest | |
| needs: release-wheel | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download wheel artifacts | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: wheel | |
| path: dist | |
| - name: Normalize release version | |
| id: normalize | |
| run: | | |
| version="${{ inputs.version }}" | |
| echo "release_tag=v$version" >> "$GITHUB_OUTPUT" | |
| - name: Create GitHub release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.normalize.outputs.release_tag }} | |
| name: Release ${{ steps.normalize.outputs.release_tag }} | |
| generate_release_notes: true | |
| files: dist/*.whl |