Initial Release:
Some checks failed
CI + Mark Stable / Test & Lint (push) Has been cancelled
CI + Mark Stable / Mark stable tag (push) Has been cancelled

https://chatgpt.com/share/6941a2a4-7974-800f-8911-9ab0bf1e3873
This commit is contained in:
2025-12-16 19:19:05 +01:00
parent 9d4eccd5e0
commit 8fd45cb87b
21 changed files with 767 additions and 28 deletions

View File

@@ -0,0 +1,71 @@
name: CI + Mark Stable
on:
push:
branches:
- main
permissions:
contents: write # required to move the stable tag
jobs:
ci:
name: Test & Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # required to access tags
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
pip install .
- name: Run tests
run: |
make test
- name: Run ruff
run: |
ruff check src tests
mark-stable:
name: Mark stable tag
runs-on: ubuntu-latest
needs: ci
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Find latest version tag
id: version
run: |
git fetch --tags
TAG=$(git tag --list 'v*' --sort=-version:refname | head -n 1)
if [ -z "$TAG" ]; then
echo "No version tag found, skipping stable tagging."
exit 0
fi
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
- name: Move stable tag to latest version
if: steps.version.outputs.tag != ''
run: |
TAG="${{ steps.version.outputs.tag }}"
echo "Marking $TAG as stable"
git tag -f stable "$TAG"
git push origin :refs/tags/stable || true
git push origin stable --force