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
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,18 @@ on:
pull_request:
branches: [main]

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
test:
name: Test (${{ matrix.os }} - Python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -41,6 +49,7 @@ jobs:
lint:
name: Lint & Style Check
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout repository
uses: actions/checkout@v7
Expand Down
28 changes: 24 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@ on:
tags:
- "v*.*.*"

concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false

permissions:
contents: write

jobs:
build-and-release:
name: Build & Create Release
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout repository
uses: actions/checkout@v7
Expand All @@ -21,16 +26,31 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: "3.11"
python-version: "3.12"

- name: Install dependencies
run: |
python -m pip install --upgrade pip build twine
pip install -e ".[dev]"

- name: Verify package version matches git tag
if: startsWith(github.ref, 'refs/tags/v')
run: |
python -c "import os, prepare_commit_msg_hooks; expected = os.environ['GITHUB_REF_NAME'].lstrip('v'); actual = prepare_commit_msg_hooks.__version__; assert actual == expected, f'__version__ {actual} != tag {expected}'"

- name: Install dependencies & build package
- name: Run quality gates, tests, build & twine check
run: |
python -m pip install --upgrade pip build pytest
ruff check .
ruff format --check .
mypy --strict prepare_commit_msg_hooks
pytest tests/ -v
python -m build
twine check dist/*

- name: Create GitHub Release
uses: softprops/action-gh-release@v3
with:
files: dist/*
files: |
dist/*.whl
dist/*.tar.gz
generate_release_notes: true
2 changes: 1 addition & 1 deletion prepare_commit_msg_hooks/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""AI Commit message generator for pre-commit."""

__version__ = "1.0.3"
__version__ = "1.0.4"

__all__ = ["__version__"]
Loading