From e28d678289a0f1e37b342b13bca033fc17893d6a Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 29 Jan 2026 12:35:30 +0000 Subject: [PATCH] Use workflow_dispatch instead of workflow_call for releases PyPI trusted publishing doesn't support reusable workflows, so switch to a two-step manual process: 1. Run "Cut Release" to create the tag and bump version 2. Run "Release" manually with the tag to publish to PyPI Changes: - release.yml: Replace workflow_call with workflow_dispatch, add tag input - cut-release.yml: Remove the release job that called release.yml, update summary with instructions for the next step https://claude.ai/code/session_01EbCZH6NCwRCDVVgu68bc9L --- .github/workflows/cut-release.yml | 15 +++++---------- .github/workflows/release.yml | 16 ++++++++-------- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/.github/workflows/cut-release.yml b/.github/workflows/cut-release.yml index 3eeeb67..740cb16 100644 --- a/.github/workflows/cut-release.yml +++ b/.github/workflows/cut-release.yml @@ -10,7 +10,6 @@ on: permissions: contents: write - id-token: write # Required for PyPI trusted publishing jobs: cut-release: @@ -65,13 +64,9 @@ jobs: - name: Summary run: | - echo "## Release $VERSION created!" >> $GITHUB_STEP_SUMMARY + echo "## Tag $VERSION created!" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY - echo "Tag \`$VERSION\` has been pushed. Release workflow will now run." >> $GITHUB_STEP_SUMMARY - - release: - name: Release - needs: cut-release - uses: ./.github/workflows/release.yml - with: - version: ${{ github.event.inputs.version }} + echo "Now run the **Release** workflow manually:" >> $GITHUB_STEP_SUMMARY + echo "1. Go to [Actions → Release](/${{ github.repository }}/actions/workflows/release.yml)" >> $GITHUB_STEP_SUMMARY + echo "2. Click **Run workflow**" >> $GITHUB_STEP_SUMMARY + echo "3. Enter \`$VERSION\` as the tag" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a5ab33d..c546d2c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,16 +5,16 @@ on: tags: - 'v[0-9]+.[0-9]+.[0-9]+' - 'v[0-9]+.[0-9]+.[0-9]+-*' # Allow pre-release tags like v0.2.0-beta1 - workflow_call: + workflow_dispatch: inputs: - version: - description: 'Version tag to release (e.g., v0.2.0)' + tag: + description: 'Tag to release (e.g., v0.2.0)' required: true type: string env: - # Use input version for workflow_call, or ref_name for tag push - RELEASE_VERSION: ${{ inputs.version || github.ref_name }} + # Use input tag for workflow_dispatch, or ref_name for tag push + RELEASE_VERSION: ${{ inputs.tag || github.ref_name }} jobs: build: @@ -24,7 +24,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ inputs.version || github.ref_name }} + ref: ${{ inputs.tag || github.ref_name }} - name: Set up Python uses: actions/setup-python@v5 @@ -51,7 +51,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ inputs.version || github.ref_name }} + ref: ${{ inputs.tag || github.ref_name }} - name: Set up Python uses: actions/setup-python@v5 @@ -103,7 +103,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ inputs.version || github.ref_name }} + ref: ${{ inputs.tag || github.ref_name }} - name: Download distribution artifacts uses: actions/download-artifact@v4