Publish brightest-path-lib (cudmore) #17
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
# my twine key is in | |
# TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
name: Publish brightest-path-lib (cudmore) | |
on: | |
workflow_run: | |
workflows: ["Release"] | |
types: [completed] | |
#branches: [main] | |
jobs: | |
publish-linux: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- ["3.8", "cp38"] | |
- ["3.9", "cp39"] | |
- ["3.10", "cp310"] | |
- ["3.11", "cp311"] | |
platform: ["manylinux_x86_64"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version[0] }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version[0] }} | |
cache: pip | |
cache-dependency-path: setup.py | |
- name: Install dependencies | |
run: | | |
pip install setuptools wheel numpy transonic psutil twine build | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
CIBW_BUILD: ${{ matrix.python-version[1] }}-${{ matrix.platform }} | |
CIBW_BUILD_FRONTEND: "build" # "pip" | |
with: | |
output-dir: "dist" | |
config-file: "pyproject.toml" | |
- name: Publish | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }} | |
run: | | |
git tag | |
twine upload dist/*manylinux*.whl --verbose | |
continue-on-error: true | |
publish-windows: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
cache-dependency-path: setup.py | |
- name: Install dependencies | |
run: | | |
pip install setuptools wheel numpy transonic psutil twine build | |
- name: Publish to PyPi with twine (windows) | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }} | |
# TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
run: | | |
git tag | |
python -m build . | |
twine upload dist/* --verbose | |
continue-on-error: true | |
publish-macos: | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python cudmore ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
cache-dependency-path: setup.py | |
- name: Install dependencies - cudmore | |
run: | | |
pip install setuptools wheel numpy transonic psutil twine build | |
- name: Publish to PyPi with twine (cudmore - macOS) | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }} | |
# TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
run: | | |
git tag | |
python -m build . | |
twine upload dist/* --verbose | |
continue-on-error: true |