-
Notifications
You must be signed in to change notification settings - Fork 41
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
Showing
3 changed files
with
26 additions
and
13 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
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,8 +1,9 @@ | ||
name: Build and upload to PyPI | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
type: [published] | ||
types: [published] | ||
|
||
env: | ||
CIBW_BUILD: cp37-* cp38-* cp39-* cp310-* | ||
|
@@ -18,11 +19,11 @@ jobs: | |
matrix: | ||
os: [ubuntu-latest] #, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v2 | ||
- uses: actions/setup-python@v5 | ||
name: Install Python | ||
with: | ||
python-version: '3.10' | ||
|
@@ -35,20 +36,21 @@ jobs: | |
run: | | ||
# python -m cibuildwheel --output-dir wheelhouse | ||
python setup.py bdist_wheel | ||
- uses: actions/upload-artifact@v2 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: artifact-wheel-${{ matrix.os }} | ||
path: ./dist/*.whl | ||
|
||
|
||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v2 | ||
- uses: actions/setup-python@v5 | ||
name: Install Python | ||
with: | ||
python-version: '3.10' | ||
|
@@ -60,21 +62,32 @@ jobs: | |
- name: Build sdist | ||
run: python setup.py sdist | ||
|
||
- uses: actions/upload-artifact@v2 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: artifact-sdist | ||
path: dist/*.tar.gz | ||
|
||
upload_pypi: | ||
needs: [build_wheels, build_sdist] | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
steps: | ||
- uses: actions/download-artifact@v2 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: artifact | ||
name: artifact-sdist | ||
path: dist | ||
|
||
- uses: pypa/gh-action-pypi-publish@master | ||
# - uses: actions/download-artifact@v4 | ||
# with: | ||
# name: artifact-wheel-windows-latest | ||
# path: dist | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: artifact-wheel-ubuntu-latest | ||
path: dist | ||
|
||
- uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.upload_pypi }} |
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