-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
testing for a new release workflow supporting python 3.12
- Loading branch information
1 parent
4928b68
commit b93bc84
Showing
1 changed file
with
26 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |