From a14bf008ce2f9cb068120de2ba4830d5e00f874c Mon Sep 17 00:00:00 2001 From: BastiTee Date: Thu, 25 Jun 2026 16:34:28 +0200 Subject: [PATCH 1/4] Improve rename script --- rename_template.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rename_template.sh b/rename_template.sh index 078cb40..8bfe4bb 100755 --- a/rename_template.sh +++ b/rename_template.sh @@ -30,7 +30,7 @@ do sed -i.rename-bak "s/my_module/$1/g" $file done # Reset version -sed -i.rename-bak "s/version = .*/version = \"0.0.1\"/g" pyproject.toml +sed -i.rename-bak "s/^version = .*/version = \"0.0.1\"/g" pyproject.toml # Overwrite README file cat <README.md @@ -39,4 +39,4 @@ EOF # Clean up find . -type f -iname "*.rename-bak" -exec rm -f {} \; -rm -f $( basename $0 ) CHANGELOG.md +rm -rf $( basename $0 ) CHANGELOG.md CLAUDE.md .claude From 290753e9177bed75bfddd99fac4ec32dda995e55 Mon Sep 17 00:00:00 2001 From: BastiTee Date: Thu, 25 Jun 2026 16:38:59 +0200 Subject: [PATCH 2/4] Add side car CI/CD --- .github/workflows/main-build.yml | 60 ++++++++++++++++++++++++++++++++ .github/workflows/main.yml | 1 + rename_template.sh | 2 +- 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/main-build.yml diff --git a/.github/workflows/main-build.yml b/.github/workflows/main-build.yml new file mode 100644 index 0000000..688aa6c --- /dev/null +++ b/.github/workflows/main-build.yml @@ -0,0 +1,60 @@ +# Side-car CI/CD script to ensure that the rename script works. +name: CI-Build + +on: + push: + branches: + - main + - feature/* + - dependabot/* + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + # https://www.python.org/downloads/ + python-version: [ + "3.10", # EOL: 2026-10 + "3.11", # EOL: 2027-10 + "3.12", # EOL: 2028-10 + "3.13", # EOL: 2029-10 + "3.14", # EOL: 2030-10 + ] + name: ${{ matrix.python-version }} + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 + + - name: Setup uv + uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7 + with: + enable-cache: true + + - name: Setup Python ${{ matrix.python-version }} + run: uv python install ${{ matrix.python-version }} + + - name: Sync dependencies + run: uv sync + + - name: Test + run: make test + + - name: Type check + run: make mypy + + - name: Lint & format check + run: make lint format-check + + - name: Build + run: uv build + + - name: Dependency vulnerability scan + run: make audit diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6c32b15..dc957e0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,3 +1,4 @@ +# Main CI/CD script for your project name: CI on: diff --git a/rename_template.sh b/rename_template.sh index 8bfe4bb..0f607b5 100755 --- a/rename_template.sh +++ b/rename_template.sh @@ -39,4 +39,4 @@ EOF # Clean up find . -type f -iname "*.rename-bak" -exec rm -f {} \; -rm -rf $( basename $0 ) CHANGELOG.md CLAUDE.md .claude +rm -rf $( basename $0 ) CHANGELOG.md CLAUDE.md .claude .github/workflows/main-build.yml From c3a280fec3bddf0f918725c2118bab5b5b3944f7 Mon Sep 17 00:00:00 2001 From: BastiTee Date: Thu, 25 Jun 2026 16:41:51 +0200 Subject: [PATCH 3/4] Implement side car --- .github/workflows/main-build.yml | 37 ++++++-------------------------- 1 file changed, 7 insertions(+), 30 deletions(-) diff --git a/.github/workflows/main-build.yml b/.github/workflows/main-build.yml index 688aa6c..c6a292c 100644 --- a/.github/workflows/main-build.yml +++ b/.github/workflows/main-build.yml @@ -18,18 +18,7 @@ concurrency: jobs: build: runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - # https://www.python.org/downloads/ - python-version: [ - "3.10", # EOL: 2026-10 - "3.11", # EOL: 2027-10 - "3.12", # EOL: 2028-10 - "3.13", # EOL: 2029-10 - "3.14", # EOL: 2030-10 - ] - name: ${{ matrix.python-version }} + name: Test rename script steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 @@ -38,23 +27,11 @@ jobs: with: enable-cache: true - - name: Setup Python ${{ matrix.python-version }} - run: uv python install ${{ matrix.python-version }} + - name: Setup Python + run: uv python install 3.14 - - name: Sync dependencies - run: uv sync + - name: Run rename + run: ./rename_template.sh mymod - - name: Test - run: make test - - - name: Type check - run: make mypy - - - name: Lint & format check - run: make lint format-check - - - name: Build - run: uv build - - - name: Dependency vulnerability scan - run: make audit + - name: Run basic build process + run: make From bc99e8eaecdcf1cfdb5658da72a639a188b5a9e0 Mon Sep 17 00:00:00 2001 From: BastiTee Date: Thu, 25 Jun 2026 16:44:09 +0200 Subject: [PATCH 4/4] Add clean step --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index d88e55d..66d651d 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,7 @@ clean: ## Remove .venv, caches, and build artifacts find . -type d \ -name ".venv" -o \ -name ".tox" -o \ + -name ".coverage" -o \ -name ".ropeproject" -o \ -name ".mypy_cache" -o \ -name ".ruff_cache" -o \