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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
- name: 🧪 tox -e ${{ matrix.tox_env }}
run: uv run tox -e ${{ matrix.tox_env }}
- name: "🐔 codecov: upload test coverage"
continue-on-error: true
uses: codecov/codecov-action@v4.2.0
with:
flags: ${{ matrix.tox_env }}
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@ name: Build & Publish Doc

on:
push:
tags:
- '*'
branches:
- main
- docs/**
workflow_dispatch:

concurrency:
group: docs
cancel-in-progress: true

jobs:

Build-Doc:
runs-on: ubuntu-latest
concurrency: release
permissions:
contents: write
id-token: write
contents: read
steps:
- name: 📥 checkout
uses: actions/checkout@v7
Expand All @@ -24,7 +25,7 @@ jobs:
- name: 🔧 setup uv
uses: ./.github/uv
- name: ⚙️ install deps
run: uv sync --extra docs
run: uv sync --group docs
- name: 📙 mkdocs build
run: uv run mkdocs build
- name: 📦 Upload artifacts
Expand All @@ -44,4 +45,4 @@ jobs:
uses: actions/deploy-pages@v4
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
url: ${{ steps.deployment.outputs.page_url }}
13 changes: 6 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,19 @@ jobs:
uses: actions/checkout@v7
with:
fetch-depth: 0
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
- name: 🔧 setup uv
uses: ./.github/uv
- name: 📜 semantic release version & publish on PyPI
run: |
RET_CODE=0
uv run semantic-release --strict version || RET_CODE=$?
if [ $RET_CODE -ne 0 ]; then
next_version=$(uv run semantic-release version --print)
last_released_version=$(uv run semantic-release version --print-last-released)
if [[ "$next_version" == "$last_released_version" ]]; then
echo "🙅🏽 Nothing to publish"
else
echo "🙆🏽 Publishing on PyPI"
uv build
uv run twine upload dist/*
uv run semantic-release --strict version
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
29 changes: 22 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@ Changelog = "https://github.com/hadrien/fastsqla/releases"
license-files = []

[project.optional-dependencies]
sqlmodel = ["sqlmodel>=0.0.22"]

[tool.uv]
package = true

[dependency-groups]
docs = [
"mkdocs-glightbox>=0.5.2",
"mkdocs-llmstxt>=0.5.0",
"mkdocs-material>=9.7.1",
"mkdocstrings[python]>=1.0.0",
"pygments @ git+https://github.com/pygments/pygments.git@b6f6dab78e13652741d5e5811b4256b4dcb5fcd8",
]
sqlmodel = ["sqlmodel>=0.0.22"]

[tool.uv]
package = true

[dependency-groups]
dev = [
"asgi-lifespan>=2.1.0",
"coverage>=7.6.1",
Expand Down Expand Up @@ -94,9 +94,24 @@ env = "GH_TOKEN"
[tool.semantic_release]
version_toml = ["pyproject.toml:project.version"]
allow_zero_version = true
build_command_env = ["TWINE_USERNAME", "TWINE_PASSWORD"]
build_command = """
uv lock &&
git add uv.lock &&
uv build &&
uv run twine check dist/* &&
uv run twine upload --non-interactive --skip-existing --verbose dist/*
"""
commit_message = """\
chore(release): v{version}

Automatically generated by python-semantic-release
"""

[tool.semantic_release.commit_parser_options]
patch_tags = ["fix", "perf", "build"]
minor_tags = ["feat"]
patch_tags = ["build", "ci", "docs", "fix", "perf", "refactor", "style", "test"]
other_allowed_tags = ["chore"]

[tool.semantic_release.changelog]
mode = "init"
Expand Down
28 changes: 15 additions & 13 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading