Skip to content

version replacement in CI #68

version replacement in CI

version replacement in CI #68

Workflow file for this run

name: Build & Test
on: [ push ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.8, 3.13 ]
steps:
- name: Checkout 🛒
uses: actions/checkout@v5
- name: Install uv 💜
uses: astral-sh/setup-uv@v6
- name: Install and run ruff 🐶
uses: astral-sh/ruff-action@v3
- name: Set up Python ${{ matrix.python-version }} 🐍
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies 📦
run: |
uv sync --all-groups --frozen
- name: Lint with flake8 ❄️
run: |
uv run flake8 --config flake8.cfg
- name: Test with pytest ✅
run: |
uv run pytest tests
- name: Version replacement based on tag ↔️
if: github.ref_type == 'tag'
run: |
TAG_VERSION=${GITHUB_REF#refs/tags/}
echo "Tag version: $TAG_VERSION"
sed -i "s/0.0.0/$TAG_VERSION/" pyproject.toml
uv version