From 12495f5e9697b3e83d9bcedd8dcc7eede2f4d6cc Mon Sep 17 00:00:00 2001 From: cjumel Date: Fri, 12 Sep 2025 19:00:17 +0200 Subject: [PATCH 1/3] fix: keep version in 0.x.x --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 5f05c75..8864dff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" From bb4ec2ebb3643bb8020c47da4f01d8302708097a Mon Sep 17 00:00:00 2001 From: cjumel Date: Sat, 13 Sep 2025 12:53:27 +0200 Subject: [PATCH 2/3] fix: update and simplify github actions --- .github/workflows/release.yml | 14 ++++++-------- .github/workflows/test.yml | 16 ++++++---------- Makefile | 6 ++++-- 3 files changed, 16 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3eaffe0..18358c9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Semantic Release +name: Release on: push: @@ -7,22 +7,20 @@ 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 - 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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b43e12b..36ac4e8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,8 +4,6 @@ on: pull_request: branches: ["main"] types: [opened, synchronize, reopened, ready_for_review] - push: - branches: ["main"] jobs: test: @@ -13,20 +11,18 @@ jobs: 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 diff --git a/Makefile b/Makefile index f438f95..b36c26c 100644 --- a/Makefile +++ b/Makefile @@ -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 From 6ee7994d8b3f4f3a23669ca7d6ce6484485254f4 Mon Sep 17 00:00:00 2001 From: cjumel Date: Sat, 13 Sep 2025 13:10:48 +0200 Subject: [PATCH 3/3] fix: fetch all commit history for semantic-release --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 18358c9..6d5cb60 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,6 +13,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v5 + with: + fetch-depth: 0 # Fetch all history for semantic-release - name: Install uv uses: astral-sh/setup-uv@v6