Skip to content

Commit 68074b7

Browse files
authored
ci: use joerick/[email protected] action in upload to pypi (#120)
* ci: use cibuildwheel action in upload to pypi * ci(pypi-upload): Using checkout@v1 is easier than v2 if you use setuptools_scm. * ci: remove useless option from actions/checkout@v1 * ci: try with CIBW_ENVIRONMENT * ci: remove duplicate variable definition * ci: checkout@v1 is better with setuptools_scm * ci: must keep SETUPTOOLS_SCM_PRETEND_VERSION twice because sdist needs it.
1 parent ec781d6 commit 68074b7

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

.github/workflows/upload-to-pypi.yml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,15 @@ on:
77
description: Manually force a version
88

99
env:
10-
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.event.inputs.overrideVersion }}
1110
CIBW_BUILD_VERBOSITY: 1
11+
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.event.inputs.overrideVersion }}
1212

1313
jobs:
1414
make_sdist:
1515
name: Make SDist
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v2
19-
with:
20-
fetch-depth: 0
18+
- uses: actions/checkout@v1
2119
- name: Setup Python
2220
uses: actions/setup-python@v2
2321
with:
@@ -63,21 +61,14 @@ jobs:
6361
- os: windows-latest
6462
python: 39
6563
steps:
66-
- uses: actions/checkout@v2
67-
with:
68-
fetch-depth: 0
69-
- uses: actions/setup-python@v2
70-
name: Install Python
71-
with:
72-
python-version: '3.8'
73-
- name: Install cibuildwheel
74-
run: |
75-
python -m pip install --upgrade pip
76-
python -m pip install cibuildwheel
64+
- uses: actions/checkout@v1
65+
7766
- name: Build wheels
67+
uses: joerick/[email protected]
7868
env:
7969
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
80-
run: python -m cibuildwheel --output-dir wheelhouse
70+
# Manually force a version
71+
CIBW_ENVIRONMENT: "SETUPTOOLS_SCM_PRETEND_VERSION=${{ github.event.inputs.overrideVersion }}"
8172
- uses: actions/upload-artifact@v2
8273
with:
8374
path: wheelhouse/*.whl

0 commit comments

Comments
 (0)