Skip to content

Commit d2c733d

Browse files
committed
ci: add workflow_dispatch for manual release triggering
1 parent 868ed3a commit d2c733d

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

.github/workflows/release-please.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,20 @@ name: Release
33
on:
44
push:
55
branches: [main]
6+
workflow_dispatch:
7+
inputs:
8+
force_release:
9+
description: 'Force release build (use existing tag)'
10+
required: false
11+
default: 'false'
12+
type: choice
13+
options:
14+
- 'false'
15+
- 'true'
16+
release_tag:
17+
description: 'Tag to release (e.g., cachekit-v0.1.0)'
18+
required: false
19+
type: string
620

721
permissions:
822
contents: write
@@ -38,7 +52,8 @@ jobs:
3852
build-wheels:
3953
name: Build wheels (${{ matrix.target }})
4054
needs: release-please
41-
if: needs.release-please.outputs.release_created == 'true'
55+
# Run if: release-please created a release OR manual dispatch with force_release
56+
if: needs.release-please.outputs.release_created == 'true' || github.event.inputs.force_release == 'true'
4257
strategy:
4358
matrix:
4459
include:
@@ -60,7 +75,8 @@ jobs:
6075
steps:
6176
- uses: actions/checkout@v4
6277
with:
63-
ref: ${{ needs.release-please.outputs.tag_name }}
78+
# Use release-please tag or manual input tag
79+
ref: ${{ needs.release-please.outputs.tag_name || github.event.inputs.release_tag }}
6480

6581
# Python setup required for native builds (macOS/Windows) to discover interpreters
6682
# Linux uses Docker containers which have Python pre-installed
@@ -90,12 +106,12 @@ jobs:
90106
build-sdist:
91107
name: Build source distribution
92108
needs: release-please
93-
if: needs.release-please.outputs.release_created == 'true'
109+
if: needs.release-please.outputs.release_created == 'true' || github.event.inputs.force_release == 'true'
94110
runs-on: ubuntu-latest
95111
steps:
96112
- uses: actions/checkout@v4
97113
with:
98-
ref: ${{ needs.release-please.outputs.tag_name }}
114+
ref: ${{ needs.release-please.outputs.tag_name || github.event.inputs.release_tag }}
99115

100116
- uses: PyO3/maturin-action@v1
101117
with:

0 commit comments

Comments
 (0)