Skip to content

[python] Release wheels #19

[python] Release wheels

[python] Release wheels #19

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