Skip to content

Draft Release

Draft Release #2

name: Draft Release
on:
workflow_run:
workflows: ["Test"]
types:
- completed
workflow_dispatch: {}
jobs:
release-draft:
permissions:
contents: write
runs-on: ubuntu-latest
if: >
github.event.workflow_run.conclusion == 'success' &&
startsWith(github.event.workflow_run.head_commit.message, 'refs/tags/')
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Build
run: uv build
- name: Create release
env:
tag: ${{ github.ref_name }}
run: |
gh release create -d "$tag" \
--repo="$GITHUB_REPOSITORY" \
--title="${GITHUB_REPOSITORY#*/} ${tag#v}" \
--generate-notes \
--latest \
dist/*.tar.gz dist/*.whl