Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 15 additions & 16 deletions .github/workflows/_build-wheel-release-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,16 @@ on:
description: GitHub username authorized to start GitHub/PyPI release'
required: true
type: string
python_version:
description: 'Python version to use. If not provided (or set to 0), will be detected from pyproject.toml'

python_versions:
description: 'Python versions to use. If not provided (or set to 0), will be detected from pyproject.toml'
default: 0
required: false
type: number
secrets:
PYPI_TOKEN:
description: 'PyPI token'
required: true
PAT_TOKEN:
description: 'GitHub Personal Access Token'
required: true

jobs:
Expand All @@ -36,20 +35,22 @@ jobs:
with:
maintainer_github_username: ${{ inputs.maintainer_github_username }}

get-python-version:
get-python-versions:
needs: [check-tag-privilege]
uses: ./.github/workflows/_get-python-version-latest.yml
uses: ./.github/workflows/_get-python-version.yml
with:
python_version: ${{ inputs.python_version }}
python_versions: ${{ inputs.python_versions }}

build-wheel:
needs: [get-python-version]
needs: [get-python-versions]
strategy:
matrix:
python-version: ${{ fromJson(needs.get-python-versions.outputs.python_versions_json) }}
uses: ./.github/workflows/_build-wheel.yml
with:
project: ${{ inputs.project }}
c_extension: ${{ inputs.c_extension }}
# Convert from number to string
python_version: ${{ fromJSON(needs.get-python-version.outputs.python_version) }}
python_version: ${{ matrix.python-version }}

release-github:
needs: [build-wheel]
Expand All @@ -58,19 +59,17 @@ jobs:
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}

release-pypi:
needs: [release-github, get-python-version]
needs: [ release-github, get-python-versions ]
uses: ./.github/workflows/_release-pypi.yml
with:
# Convert from number to string
python_version: ${{ fromJSON(needs.get-python-version.outputs.python_version) }}
python_versions_json: ${{ needs.get-python-versions.outputs.python_versions_json }}
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

docs-release:
needs: [release-github, get-python-version]
needs: [ release-github, get-python-versions ]
uses: ./.github/workflows/_release-docs.yml
with:
project: ${{ inputs.project }}
c_extension: ${{ inputs.c_extension }}
# Convert from number to string
python_version: ${{ fromJSON(needs.get-python-version.outputs.python_version) }}
python_versions_json: ${{ needs.get-python-versions.outputs.python_versions_json }}