Skip to content

Commit 20435ec

Browse files
committed
improve naming
1 parent 219a349 commit 20435ec

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

.github/workflows/cd-pypi.yml

+11-13
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,26 @@ on:
1616
type: string
1717
required: false
1818
default: "./"
19-
platforms:
20-
description: Platforms to build for e.g. "['ubuntu-latest','macos-latest','windows-latest']"
19+
binwheel_platforms:
20+
description: For not pure python project, the platforms to build for e.g. "['ubuntu-latest','macos-latest','windows-latest']"
2121
required: false
2222
type: string
2323
default: ''
24-
pyversions:
25-
description: Python versions to build for e.g. "['38','39','310','311','312']"
24+
binwheel_pyversions:
25+
description: For not pure python project, the Python versions to build for e.g. "['38','39','310','311','312','313']"
2626
required: false
2727
type: string
2828
default: ''
29-
build_args:
29+
purepython_buildargs:
3030
description: Args to pass in to build as `python -m build {build_args}` e.g. '--sdist'
31+
If using binary wheels, set to --sdist to upload just the source distribution.
3132
type: string
3233
required: false
3334
default: ''
3435

3536

3637
jobs:
37-
deploy_source:
38+
deploy_purepython:
3839
if: ${{ github.ref_type == 'tag' || github.event_name == 'release' || inputs.testpypi }}
3940
runs-on: ubuntu-latest
4041
defaults:
@@ -115,15 +116,14 @@ jobs:
115116
twine upload --repository testpypi --verbose dist/*
116117
117118
118-
deploy_wheels:
119+
deploy_binary_wheels:
119120
if: inputs.platforms != '' && inputs.pyversions != ''
120-
needs: deploy_source
121-
name: Build wheels and source distribution
121+
needs: deploy_purepython
122122
strategy:
123123
matrix:
124-
os: ${{ fromJson(inputs.platforms) }}
124+
platform: ${{ fromJson(inputs.platforms) }}
125125
python: ${{ fromJson(inputs.pyversions) }}
126-
runs-on: ${{ matrix.os }}
126+
runs-on: ${{ matrix.platform }}
127127
defaults:
128128
run:
129129
working-directory: ${{ inputs.working-directory }}
@@ -155,7 +155,6 @@ jobs:
155155
TWINE_USERNAME: __token__
156156
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
157157
run: |
158-
pip install twine
159158
twine check dist/*.whl
160159
twine upload dist/*.whl
161160
@@ -165,7 +164,6 @@ jobs:
165164
TWINE_USERNAME: __token__
166165
TWINE_PASSWORD: ${{ secrets.PYPI_TEST_API_TOKEN }}
167166
run: |
168-
pip install twine
169167
twine check dist/*.whl
170168
# HINT: if your upload fails here due to "unsupported local version",
171169
# put `local_scheme = "no-local-version"` pyproject.toml's

0 commit comments

Comments
 (0)