You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add workflow_dispatch input (release_tag) and validate its format so the workflow can be run manually for a specific tag. Update checkout steps to use the provided tag for manual runs, and relax job guards to allow workflow_dispatch to trigger release/build/publish jobs. Add per-run validation steps that ensure a tag-like value is provided. Bump publish job Python to 3.12, add an explicit pre-upload check for the TWINE_API_KEY secret, and remove the twine --verbose flag. Also update the workflow usage comment to mention manual re-runs.
Copy file name to clipboardExpand all lines: .github/workflows/python-package.yml
+55-5Lines changed: 55 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,15 @@ name: Build, validate & Release
3
3
# Usage:
4
4
# - For PRs: this workflow runs automatically to validate the package builds and installs correctly on multiple Python versions. No artifacts are published for PRs.
5
5
# - For releases: when you push a tag like v1.2.3, this workflow runs the full matrix validation, then builds the release artifacts, and finally publishes to PyPI if all checks pass.
6
+
# - For manual re-runs: use "Run workflow" and provide a tag-like value such as v2.0.0rc1.
6
7
7
8
on:
8
9
workflow_dispatch:
10
+
inputs:
11
+
release_tag:
12
+
description: 'Tag to build/publish (e.g. v1.2.3 or v2.0.0rc1)'
13
+
required: true
14
+
type: string
9
15
# Release pipeline: run only when pushing a version-like tag (e.g. v1.2.3)
10
16
# Test pipeline: run tests on main/master pushes & pull requests AND tags.
0 commit comments