Update publish workflow to allow manual triggering
This commit is contained in:
9
.github/workflows/publish.yml
vendored
9
.github/workflows/publish.yml
vendored
@@ -1,18 +1,15 @@
|
||||
name: Publish to PyPI
|
||||
|
||||
# This workflow is triggered when you push a new version tag (e.g., v0.1.0, v1.2.3)
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v[0-9]+.[0-9]+.[0-9]+*' # Matches v0.1.0 or v1.0.0-rc1, etc.
|
||||
# Allows manual triggering from the GitHub Actions UI
|
||||
- 'v[0-9]+.[0-9]+.[0-9]+*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build_wheels:
|
||||
name: Build wheels on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
# Define a matrix to build for common operating systems and architectures
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
@@ -57,8 +54,8 @@ jobs:
|
||||
name: Publish to PyPI
|
||||
needs: [build_wheels]
|
||||
runs-on: ubuntu-latest
|
||||
# This step will only run if the 'build_wheels' job completed successfully
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
# Run on tags OR manual trigger
|
||||
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
|
||||
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
|
||||
Reference in New Issue
Block a user