diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 000000000..274d78798 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/testcext.yml b/.github/workflows/testcext.yml index c6b9121bd..baecc4b94 100644 --- a/.github/workflows/testcext.yml +++ b/.github/workflows/testcext.yml @@ -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: @@ -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 diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 74bb76da9..1b1090789 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -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: