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
37 changes: 37 additions & 0 deletions .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 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
name: Test rename script
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7

- name: Setup uv
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
with:
enable-cache: true

- name: Setup Python
run: uv python install 3.14

- name: Run rename
run: ./rename_template.sh mymod

- name: Run basic build process
run: make
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Main CI/CD script for your project
name: CI

on:
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
4 changes: 2 additions & 2 deletions rename_template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF >README.md
Expand All @@ -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 .github/workflows/main-build.yml