Skip to content

Commit

Permalink
CI/CD: Prevent release workflow from failing due to pure wheel.
Browse files Browse the repository at this point in the history
  • Loading branch information
zoj613 committed Apr 29, 2023
1 parent 4f714b5 commit 264b052
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ on:
workflow_dispatch:

jobs:
build_wheels_and_sdist:
build_wheel_and_sdist:
name: Build wheels
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ ubuntu-20.04, macOS-11, windows-2019 ]
os: [ ubuntu-20.04 ]
python-version: [ '3.8' ]

steps:
Expand All @@ -27,35 +27,29 @@ jobs:

- name: Install Dependencies
run: |
python3 -m pip install --upgrade pip setuptools wheel cibuildwheel==2.12.3
python3 -m pip install --upgrade pip setuptools wheel
pip install -r requirements-dev.txt
- name: Build wheels
run: cibuildwheel --output-dir wheelhouse --config-file pyproject.toml
- name: Build source distribution and pure wheel
run: python -m build

- name: Build source distribution
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: |
python -m build --sdist
mv dist/*.gz wheelhouse
- name: Store the wheelhouse directory
- name: Store the built wheel and sdist
uses: actions/upload-artifact@v3
with:
name: wheels_and_sdist
path: wheelhouse
name: wheel_and_sdist
path: dist
if-no-files-found: error

upload_pypi:
needs: [ build_wheels_and_sdist ]
needs: [ build_wheel_and_sdist ]
runs-on: ubuntu-20.04
environment:
name: pypi
url: https://pypi.org/p/pyloras
permissions:
id-token: write
steps:
- name: Pull built wheels and sdist
- name: Pull built wheel and sdist
uses: actions/download-artifact@v3
with:
name: wheels_and_sdist
Expand Down

0 comments on commit 264b052

Please sign in to comment.