Skip to content

Commit

Permalink
add deploy action
Browse files Browse the repository at this point in the history
Should create binary wheels for Windows,
MacOS and "MANY" Linux and source code
packages and upload them PyPI.

Triggered by tags matching "v*".
  • Loading branch information
mozman committed Dec 11, 2020
1 parent c2f2eb5 commit 35235ce
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 3 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: PyPI deployer
on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
# Build and deploy manylinux wheel
Linux-build:
runs-on: ubuntu-latest
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
steps:
- uses: actions/checkout@v2
- name: build and upload manylinux wheels
uses: Niraj-Kamdar/manylinux-wheel-builder@master
with:
python-versions: "3.*"
# if true then github actions won't stop even if build for this job fails
continue-on-error: true

# deploy source distribution
Source-dist:
runs-on: windows-latest
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: create source distribution
run: python setup.py sdist
- name: upload source distribution
run: |
pip install twine
twine upload dist/*
continue-on-error: true

# Build and deploy wheels for macos and windows using setup-python action.
# This has nothing to do with manylinux-wheel-builder.
# I have just put them for the purpose of completion.
Matrix-build:
runs-on: ${{ matrix.os }}
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
strategy:
matrix:
os: [macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: build wheel
run: |
pip install wheel
python setup.py bdist_wheel
- name: upload wheel
run: |
pip install twine
twine upload dist/*
continue-on-error: true
4 changes: 2 additions & 2 deletions .github/workflows/testcext.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Test C-extensions
name: Test with C-extensions

on:
push:
Expand All @@ -27,7 +27,7 @@ jobs:
python -m pip install --upgrade pip
# This are just testing requirements:
python -m pip install pytest pyparsing geomdl cython
- name: Build C-extensions
- name: Install with C-extensions
run: |
python setup.py install
- name: Test with C-extensions
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Test without C-extension
name: Test without C-extensions

on:
push:
Expand Down

0 comments on commit 35235ce

Please sign in to comment.