Skip to content

Commit

Permalink
ci: use joerick/[email protected] action in upload to pypi (#120)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
deepcharles authored Feb 12, 2021
1 parent ec781d6 commit 68074b7
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions .github/workflows/upload-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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/[email protected]
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
Expand Down

0 comments on commit 68074b7

Please sign in to comment.