Skip to content

Commit

Permalink
ci: fix wheel builds
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Sep 13, 2024
1 parent c5baacd commit e8153d4
Showing 1 changed file with 20 additions and 44 deletions.
64 changes: 20 additions & 44 deletions .github/workflows/deploy_pypi.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,30 @@
name: Release to PyPI
name: Deploy to PyPI

on:
push:
tags:
- '*'

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
deploy:

steps:
- uses: actions/checkout@main
with:
fetch-depth: 0

# Used to host cibuildwheel
- uses: actions/setup-python@main

- name: Build wheels
run: |
pip install wheel
python -m pip wheel --no-deps -w dist .
- name: publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PWD }}
run: |
pipx install twine
twine upload --skip-existing dist/*
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
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/*
steps:
- uses: actions/checkout@main
- name: Set up Python
uses: actions/setup-python@main
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine pipx
pip install .
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PWD }}
run: |
pipx run build --sdist --wheel
twine upload --skip-existing dist/*

0 comments on commit e8153d4

Please sign in to comment.