Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions .github/workflows/cut-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:

permissions:
contents: write
id-token: write # Required for PyPI trusted publishing

jobs:
cut-release:
Expand Down Expand Up @@ -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
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down