Skip to content

add actions

add actions #21

Workflow file for this run

name: Build, Test and Deploy
on:
push:
branches:
- main
- develop
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
python-version: ['3.10', '3.11', '3.12']
steps:
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: |
pip install --upgrade pip setuptools rich pybind11 wheel requests
- name: Build wheel
run: |
python setup.py sdist bdist_wheel
- name: Run tests
run: |
pip3 install dist/*.whl
python tests/test_color_gen.py test_image.jpg 1
- name: Deploy to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
with:
user: T-Dynamos
password: ${{ secrets.pypi_token }}