Skip to content

Merge pull request #59 from Lakshmi-bashyam/scikit-learn-1.4 #6

Merge pull request #59 from Lakshmi-bashyam/scikit-learn-1.4

Merge pull request #59 from Lakshmi-bashyam/scikit-learn-1.4 #6

Workflow file for this run

name: Publish Release
on:
push:
tags:
- "*"
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
cache: 'poetry'
- name: Install dependencies
run: poetry install --no-root
- name: Test Code
run: poetry run pytest
publish-pypi:
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Build and upload to PyPI
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
run: |
if [ $(poetry version -s) != ${{ github.ref_name }} ]; then
echo "The version specified in pyproject.toml and the tag name are not the same"
echo "Will use the tag name as version name"
poetry version ${{ github.ref_name }}
fi
poetry publish --build