Skip to content

Update CD release action #35

Update CD release action

Update CD release action #35

Workflow file for this run

# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: Upload Python Package
on:
release:
types: [created]
workflow_dispatch:
jobs:
deploy-unix:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
git clone https://github.com/martinus/robin-hood-hashing ripser/robinhood
python -m pip install --upgrade pip
python -m pip install --upgrade build
pip install setuptools wheel twine Cython numpy pytest
python -m pip install .
- name: Run tests
run: pytest .
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m build
twine upload --skip-existing dist/*
deploy-windows-pip:
strategy:
fail-fast: false
matrix:
arch: ["x86", "x64"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
runs-on: "windows-latest"
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.arch }}
- name: Install dependencies
run: |
git clone https://github.com/martinus/robin-hood-hashing ripser/robinhood
python -m pip install --upgrade pip
python -m pip install --upgrade build
pip install setuptools wheel twine Cython numpy pytest
python -m pip install .
- name: Run tests
run: pytest .
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m build
twine upload --skip-existing dist/*