Update publish workflow to allow manual triggering

This commit is contained in:
BillTheMaker
2025-12-06 16:19:02 -07:00
committed by GitHub
parent 7b5e615c00
commit 30d741b418

View File

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