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
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Semantic Release
name: Release

on:
push:
Expand All @@ -7,22 +7,22 @@ on:

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write

runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0 # Fetch all history for semantic-release

- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v6

- name: Install dependencies
run: |
uv sync
run: uv sync

- name: Run semantic-release
- name: Release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: uv run semantic-release version
16 changes: 6 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,25 @@ on:
pull_request:
branches: ["main"]
types: [opened, synchronize, reopened, ready_for_review]
push:
branches: ["main"]

jobs:
test:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.13"] # Only test min and max supported versions
python-version: ["3.9", "3.13"] # Min and max supported versions
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
make install-dev
run: make install

- name: Run tests
run: |
make test
- name: Test
run: make test
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
install-dev:
@echo "Installing local package..."
install:
uv sync
install-dev:
@$(MAKE) install
uv run pre-commit install

test:
@echo "Running tests..."
uv run pre-commit run --all-files
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ patch_tags = ["fix", "perf"]
[tool.semantic_release]
commit_message = "{version}\n\nAutomatically generated by python-semantic-release"
commit_parser = "conventional"
allow_zero_version = true
major_on_zero = false
build_command = """
uv lock --upgrade-package "$PACKAGE_NAME"
Expand Down