-
Notifications
You must be signed in to change notification settings - Fork 999
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup GitHub actions to build and publish sdist and wheels
- Loading branch information
Showing
4 changed files
with
149 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Build Mac OS X package and upload it to PyPI | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [macos-latest] | ||
architecture: [x64] | ||
python-version: [3.6, 3.7, 3.8] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
architecture: ${{ matrix.architecture }} | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel twine | ||
- name: Build Python wheel | ||
run: | | ||
python setup.py bdist_wheel | ||
- name: Upload artifacts for inspection | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: wheel_${{ matrix.os }}_${{ matrix.architecture }}_${{ matrix.python-version }} | ||
path: dist/*.whl | ||
- name: Publish sdists and wheels to PyPI | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
twine upload dist/* || : |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Build manylinux1 x86_64 package and upload it to PyPI | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.x | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel twine | ||
- name: Build manylinux Python wheels | ||
uses: RalfG/python-wheels-manylinux-build@v0.3-manylinux1_x86_64 | ||
with: | ||
python-versions: 'cp36-cp36m cp37-cp37m cp38-cp38' | ||
build-requirements: 'cython' | ||
- name: Upload artifacts for inspection | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: manylinux1_wheels | ||
path: dist/*.whl | ||
- name: Publish sdists and wheels to PyPI | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
twine upload dist/* || : |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Create sdists package and upload it to PyPI | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.x | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel twine | ||
- name: Create sdist | ||
run: | | ||
python setup.py sdist | ||
- name: Upload artifacts for inspection | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: sdist | ||
path: dist/*.tar.gz | ||
- name: Publish sdists and wheels to PyPI | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
twine upload dist/* || : |
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Build Windows package and upload it to PyPI | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [windows-latest] | ||
architecture: [x64, x86] | ||
python-version: [3.6, 3.7, 3.8] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.x | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel twine | ||
- name: Build Python wheel | ||
run: | | ||
python setup.py bdist_wheel | ||
- name: Upload artifacts for inspection | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: wheel_${{ matrix.os }}_${{ matrix.architecture }}_${{ matrix.python-version }} | ||
path: dist/*.whl | ||
- name: Publish sdists and wheels to PyPI | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
twine upload dist/* || : |