Skip to content

v0.2.0

v0.2.0 #1

Workflow file for this run

name: Release Pipeline
on:
push:
tags: ['v*'] # ← Trigger on git tag push
release:
types: [published] # ← Trigger on GitHub release creation
workflow_dispatch:
jobs:
release-test:
name: Release Tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11', '3.12']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install pytest pytest-cov
- name: Run comprehensive test suite
run: |
pytest tests/ -v --cov=map_binning --cov-report=xml --cov-report=term --cov-fail-under=80
build-and-publish:
name: Build and Publish to PyPI
runs-on: ubuntu-latest
needs: release-test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
run: |
python -m build
- name: Check package
run: |
twine check dist/*
- name: Publish to Test PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
run: |
twine upload --repository testpypi dist/* --skip-existing
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PIPY_TOKEN }}
run: |
twine upload dist/*