Skip to content

Commit

Permalink
testing for a new release workflow supporting python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
phenobarbital committed Jan 16, 2024
1 parent 4928b68 commit b93bc84
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,55 @@
name: Python package build and publish

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: [3.9, 3.10, 3.11, 3.12]
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.9
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install twine
- name: Build manylinux Python wheels
pip install twine
- name: Build wheels
if: matrix.os == 'ubuntu-latest'
uses: RalfG/[email protected]_x86_64
with:
python-versions: 'cp39-cp39 cp310-cp310 cp311-cp311'
python-versions: 'cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312'
build-requirements: 'cython numpy'

- name: Build wheels for Windows
if: matrix.os == 'windows-latest'
run: |
pip install cibuildwheel
cibuildwheel --output-dir wheelhouse
# You may need to adjust the above command based on your package's specific requirements
- name: Publish wheels to Test PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
run: |
twine upload -r testpypi dist/*-manylinux*.whl
twine upload -r testpypi wheelhouse/*.whl
- name: Publish wheels to Production PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.ASYNCDB_PYPI_API_TOKEN }}
run: |
twine upload dist/*-manylinux*.whl
twine upload wheelhouse/*.whl

0 comments on commit b93bc84

Please sign in to comment.