Prompt file imported from improving/improving-pdf (
.windsurf/workflows/release.md). Copyright stays with the author.
Release Workflow
This workflow cuts a new release of the improving-pdf-tool package. It bumps the version, commits, tags, pushes to GitHub, and creates a GitHub release.
Prerequisites
Before starting, verify all of the following:
- Confirm you are on the
mainbranch: // turbo
git branch --show-current
If not on main, stop and tell the user.
- Confirm the working tree is clean: // turbo
git status --porcelain
If there is output (uncommitted changes), stop and tell the user to commit or stash first.
- Confirm
ghCLI is available: // turbo
gh --version
If not installed, stop and tell the user to install GitHub CLI (gh) and authenticate with gh auth login.
Steps
-
Ask the user what type of version bump to perform:
major,minor, orpatch. If the user already specified the bump type when invoking this workflow, use that. -
Read the current version from
src/improving_pdf_tool/__init__.py. The version is stored as__version__ = "X.Y.Z". Parse X, Y, Z as integers. -
Compute the new version:
patch: increment Z (e.g., 1.2.3 → 1.2.4)minor: increment Y, reset Z to 0 (e.g., 1.2.3 → 1.3.0)major: increment X, reset Y and Z to 0 (e.g., 1.2.3 → 2.0.0)
-
Update the version in both files:
src/improving_pdf_tool/__init__.py: update__version__ = "X.Y.Z"pyproject.toml: updateversion = "X.Y.Z"
-
Stage the changes:
git add -A
- Commit with the release message:
git commit -m "release: vX.Y.Z"
Replace X.Y.Z with the actual new version.
- Create an annotated git tag:
git tag -a vX.Y.Z -m "Release vX.Y.Z"
- Push the commit and tag to origin:
git push origin main --tags
- Create a GitHub release with auto-generated notes:
gh release create vX.Y.Z --title "vX.Y.Z" --generate-notes
- Print a summary for the user:
Release vX.Y.Z complete!
Install this version:
pip install git+https://github.com/improving/improving-pdf.git@vX.Y.Z
Install latest:
pip install git+https://github.com/improving/improving-pdf.git
- Check if
skill.mdexists and contains a pinned version reference (e.g.,@v). If so, remind the user to update the pinned version inskill.mdto the new version.