diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 5e09176..d1e54f0 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -5,7 +5,17 @@ on: branches: [main, master] pull_request: workflow_dispatch: + inputs: + ref: + description: 'Git ref to build from (tag like v0.1.6)' + required: false + type: string workflow_call: + inputs: + ref: + description: 'Git ref to build from' + required: false + type: string env: # CFD C library version to build against @@ -29,6 +39,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + ref: ${{ inputs.ref || github.ref }} - name: Checkout CFD C library uses: actions/checkout@v4 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4a79886..921b755 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,6 +16,10 @@ on: options: - testpypi - pypi + ref: + description: 'Git ref to build from (tag like v0.1.6, or leave empty for default branch)' + required: false + type: string # Prevent duplicate runs when release creates a tag concurrency: @@ -25,6 +29,8 @@ concurrency: jobs: build: uses: ./.github/workflows/build-wheels.yml + with: + ref: ${{ inputs.ref || github.ref }} build_sdist: name: Build source distribution @@ -34,6 +40,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + ref: ${{ inputs.ref || github.ref }} - name: Set up Python uses: actions/setup-python@v5