Skip to content

Add MSD algorithm and TestPyPI workflow #1

Add MSD algorithm and TestPyPI workflow

Add MSD algorithm and TestPyPI workflow #1

Workflow file for this run

name: Test Release
on:
push:
tags:
- '*-test' # Tags ending with -test (e.g., v0.1.6-test)
workflow_dispatch:
inputs:
version:
description: 'Version to release to TestPyPI (e.g., 0.1.6)'
required: true
type: string
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install uv
uses: astral-sh/setup-uv@v1
with:
version: "latest"
- name: Install dependencies
run: |
uv sync --dev
- name: Run tests
run: |
uv run python -m pytest tests/ -v
build:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install uv
uses: astral-sh/setup-uv@v1
with:
version: "latest"
- name: Install build dependencies
run: |
uv tool install build
- name: Build package
run: |
uv tool run --from build pyproject-build
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
publish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/