From 6fd7fcef04bd9963313ffe78288c76fbc5c64e55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20M=C3=BCller?= Date: Sat, 23 Dec 2023 00:15:17 +0100 Subject: [PATCH] ci: fix pypi build --- .github/workflows/deploy_pypi.yml | 65 +++++++++++++++++++++---------- CHANGELOG | 2 + 2 files changed, 47 insertions(+), 20 deletions(-) diff --git a/.github/workflows/deploy_pypi.yml b/.github/workflows/deploy_pypi.yml index 6048ce3..2085e6d 100644 --- a/.github/workflows/deploy_pypi.yml +++ b/.github/workflows/deploy_pypi.yml @@ -1,4 +1,4 @@ -name: Deploy to PyPI +name: Release to PyPI on: push: @@ -6,25 +6,50 @@ on: - '*' jobs: - deploy: + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-20.04, windows-2019, macos-11] - runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + # Used to host cibuildwheel + - uses: actions/setup-python@v3 + + - name: Install cibuildwheel + run: python -m pip install cibuildwheel + + - name: Build wheels + run: python -m cibuildwheel --output-dir wheelhouse + - name: publish + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_PWD }} + run: | + pipx install twine + twine upload --skip-existing wheelhouse/* + + build_sdist: + name: Build source distribution + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - pip install . - - name: Build and publish - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_PWD }} - run: | - python setup.py sdist bdist_wheel - twine upload --skip-existing dist/* + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Build sdist + run: pipx run build --sdist + + - name: publish + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_PWD }} + run: | + pipx install twine + twine upload --skip-existing dist/* diff --git a/CHANGELOG b/CHANGELOG index 2ccd4ec..0ddbd01 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +0.1.2 + - ci: fix pypi build 0.1.1 - test release 0.1.0