-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f7bb25
commit cee7837
Showing
1 changed file
with
71 additions
and
9 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 |
---|---|---|
|
@@ -4,13 +4,13 @@ on: | |
push: | ||
tags: | ||
- 'v*.*.*' | ||
workflow_dispatch: # Allow manual triggering | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
deploy: | ||
build-and-publish-linux: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
@@ -23,18 +23,80 @@ jobs: | |
with: | ||
python-version: '3.9' | ||
|
||
- name: Upgrade setuptools and install dependencies | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade setuptools wheel | ||
pip install build setuptools_scm Cython numpy | ||
python -m pip install --upgrade setuptools wheel twine cibuildwheel | ||
- name: Build package | ||
run: python -m build | ||
run: | | ||
cibuildwheel --platform linux | ||
ls wheelhouse | ||
- name: Publish package | ||
uses: pypa/[email protected] | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
run: | | ||
twine upload wheelhouse/* | ||
build-and-publish-windows: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
python-version: '3.9' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade setuptools wheel twine cibuildwheel | ||
- name: Build package | ||
run: | | ||
cibuildwheel --platform windows | ||
ls wheelhouse | ||
- name: Publish package | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
run: | | ||
twine upload wheelhouse/* | ||
build-and-publish-macos: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade setuptools wheel twine cibuildwheel | ||
- name: Build package | ||
run: | | ||
cibuildwheel --platform macos | ||
ls wheelhouse | ||
- name: Publish package | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
run: | | ||
twine upload wheelhouse/* | ||