From 68074b73f2fe0ada0d5877d2938e8e401c4c6340 Mon Sep 17 00:00:00 2001 From: Charles T Date: Fri, 12 Feb 2021 21:01:00 +0100 Subject: [PATCH] ci: use joerick/cibuildwheel@v1.9.0 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. --- .github/workflows/upload-to-pypi.yml | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/.github/workflows/upload-to-pypi.yml b/.github/workflows/upload-to-pypi.yml index eb27f65f..25842417 100644 --- a/.github/workflows/upload-to-pypi.yml +++ b/.github/workflows/upload-to-pypi.yml @@ -7,17 +7,15 @@ on: description: Manually force a version env: - SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.event.inputs.overrideVersion }} CIBW_BUILD_VERBOSITY: 1 + SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.event.inputs.overrideVersion }} jobs: make_sdist: name: Make SDist runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 + - uses: actions/checkout@v1 - name: Setup Python uses: actions/setup-python@v2 with: @@ -63,21 +61,14 @@ jobs: - os: windows-latest python: 39 steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - uses: actions/setup-python@v2 - name: Install Python - with: - python-version: '3.8' - - name: Install cibuildwheel - run: | - python -m pip install --upgrade pip - python -m pip install cibuildwheel + - uses: actions/checkout@v1 + - name: Build wheels + uses: joerick/cibuildwheel@v1.9.0 env: CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }} - run: python -m cibuildwheel --output-dir wheelhouse + # Manually force a version + CIBW_ENVIRONMENT: "SETUPTOOLS_SCM_PRETEND_VERSION=${{ github.event.inputs.overrideVersion }}" - uses: actions/upload-artifact@v2 with: path: wheelhouse/*.whl