Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 33 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,46 @@ name: Release
on:
push:
tags:
- '*.*.*'
- 'v*.*.*'

jobs:
wait-for-tests:
name: Wait for Tests
runs-on: ubuntu-latest
steps:
- name: Wait for Tests workflow to pass
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Waiting for Tests workflow on commit ${{ github.sha }}..."
for i in $(seq 1 60); do
result=$(gh api repos/${{ github.repository }}/commits/${{ github.sha }}/check-runs \
--jq '.check_runs[] | select(.name | test("Ubuntu|MacOS|Windows")) | .conclusion' 2>/dev/null || true)
if echo "$result" | grep -q "failure"; then
echo "Tests failed — aborting release."
exit 1
fi
total=$(echo "$result" | wc -l | tr -d ' ')
passed=$(echo "$result" | grep -c "success" || true)
if [ "$total" -gt 0 ] && [ "$total" -eq "$passed" ]; then
echo "All $total test jobs passed."
exit 0
fi
echo "Attempt $i: $passed/$total jobs passed so far, waiting 30s..."
sleep 30
done
echo "Timed out waiting for Tests workflow."
exit 1

release:
name: Release
needs: wait-for-tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python 3.9
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
Expand Down Expand Up @@ -42,8 +71,8 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
prerelease: steps.check-version.outputs.prerelease == 'true'

- name: Publish to PyPI
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: poetry publish
run: poetry publish
15 changes: 12 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
os: [Ubuntu, MacOS, Windows]
python-version: ["3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
fail-fast: false
defaults:
run:
Expand All @@ -34,7 +34,11 @@ jobs:

- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y
if [ "${{ matrix.python-version }}" = "3.9" ]; then
curl -sSL https://install.python-poetry.org | python - -y --version 1.8.5
else
curl -sSL https://install.python-poetry.org | python - -y
fi

- name: Update PATH
if: ${{ matrix.os != 'Windows' }}
Expand All @@ -60,7 +64,12 @@ jobs:
timeout 10s poetry run pip --version || rm -rf .venv

- name: Check lock file
run: poetry lock --check
run: |
if [ "${{ matrix.python-version }}" = "3.9" ]; then
poetry lock --check
else
poetry check --lock
fi

- name: Install dependencies
run: poetry install --without examples
Expand Down
8 changes: 5 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Change Log

## [0.12.2] - 2025-02-20
## [0.12.3] - 2025-02-20

- Fixed `__version__` in `lato/__init__.py` to match release version
- Removed EOL `pypy-3.8` from CI test matrix
- Dropped Python 3.9 from CI (Poetry 2.x requires Python 3.10+)
- Updated release workflow to use Python 3.12
- Fixed CI compatibility with Poetry 2.x (`poetry check --lock`)
- Pin Poetry 1.8.5 for Python 3.9 CI jobs
- Gate release workflow on Tests passing
- Updated release workflow to Python 3.12

## [0.12.0] - 2025-01-02

Expand Down
2 changes: 1 addition & 1 deletion lato/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from .message import Command, Event, Query
from .transaction_context import TransactionContext

__version__ = "0.12.2"
__version__ = "0.12.3"
__all__ = [
"Application",
"ApplicationModule",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "lato"
version = "0.12.2"
version = "0.12.3"
description = "Lato is a Python microframework designed for building modular monoliths and loosely coupled applications."
authors = ["Przemysław Górecki <przemyslaw.gorecki@gmail.com>"]
readme = "README.md"
Expand Down