Bump pyfocusr & pypi build python versions #23
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 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: pypi | |
on: | |
push: | |
branches: [ main, master ] | |
jobs: | |
build_sdist: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
make dev | |
make requirements | |
pip install cibuildwheel | |
# Update to only do push to pypi after succesfully running build-test.yml... instead of doing the tests here? | |
- name: Install | |
run: | | |
make install | |
- name: Test with pytest | |
run: | | |
make test | |
# build source distribution for versions wheels arent build. | |
# https://setuptools.pypa.io/en/latest/userguide/quickstart.html#install-build | |
- name: Build source distribution | |
run: | | |
make build | |
# python setup.py sdist -d wheelhouse | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-sdist | |
path: ./wheelhouse/*.tar.gz | |
# BUILD WHEELS ONLY NEEDED FOR NON-PURE PYTHON PACKAGES | |
# This is described here: https://packaging.python.org/en/latest/overview/#python-binary-distributions | |
# build_wheels: | |
# name: Build wheels | |
# runs-on: ${{ matrix.os }} | |
# strategy: | |
# matrix: | |
# os: [ubuntu-latest, windows-2019, macos-latest] | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - uses: actions/setup-python@v3 | |
# name: Install Python | |
# with: | |
# python-version: '3.7' | |
# - name: Install cibuildwheel | |
# run: python -m pip install cibuildwheel==2.7.0 | |
# - name: Build wheels | |
# run: python -m cibuildwheel --output-dir wheelhouse | |
# # - name: Build wheels | |
# # uses: pypa/cibuildwheel@v2.2.2 | |
# - uses: actions/upload-artifact@v3 | |
# with: | |
# path: ./wheelhouse/*.whl | |
upload_pypi: | |
needs: [build_sdist] #build_wheels | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
pattern: cibw-* | |
path: dist | |
merge-multiple: true | |
- uses: pypa/gh-action-pypi-publish@v1.4.2 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYFOCUSR_PYPI_TOKEN }} | |
# COMMENT BELOW OUT - DEFAULT PUSH TO pypi now! | |
# repository_url: https://test.pypi.org/legacy/ |