January 25, 2026

Automatic WordPress Theme Versioning with Semantic Release

wordpress devops git github actions automation claude code

Updated March 24, 2026

Anyone who works with WordPress themes knows this pain: manually editing versions in style.css, writing changelogs, remembering all the files when merging. What if I told you that an AI assistant can wire the entire pipeline and then handle your daily commits with short commands?

The Problem with WordPress Versioning

WordPress stores the theme version in a CSS comment in style.css, not in package.json like modern projects. Standard versioning tools don’t work out-of-the-box.

Key insight: The bridge between WordPress and Semantic Release is a single sed command that rewrites the Version: line in style.css during each release. Everything else — commit analysis, changelog generation, GitHub releases — works the standard way.

The solution is Semantic Release with the right configuration — deployed through a Claude Code skill that handles all the wiring.

One-Time Setup: Activate the Skill

Instead of manually creating configs, workflows, and scripts, run one Claude Code command:

/wordpress-theme-semantic-github-deployment

The skill auto-detects your environment — reads style.css header, git remote, branch name, existing package.json — and walks you through a short interview to select features.

What gets generated

FilePurpose
.releaserc.jsonSemantic Release config — the heart of automation
.github/workflows/release.ymlAuto-release on merge to main
.github/workflows/pr-lint.ymlBlocks merge if PR title breaks convention
package.jsonNode.js devDependencies
CONTRIBUTING.mdDeveloper guide with workflow reference

Optional features (selected during interview)

FeatureWhat it does
Beta testing (beta.sh)Builds a ZIP with -beta directory suffix — WordPress treats it as a separate theme, so you can test stable and beta side-by-side
ZIP assets (build-release.sh)Creates a clean installable ZIP (no .git, node_modules, configs) attached to each GitHub Release
GitHub beta releases (beta-release.yml)Manual “Run workflow” button in Actions — pick any branch, get a pre-release with ZIP attached
WP Admin auto-updater (includes/github-updater/)Dashboard widget showing current vs. latest version with one-click update. Works with public and private repos

Building a plugin instead of a theme? There’s an equivalent skill: /wordpress-plugin-semantic-github-deployment — same pipeline, adapted for plugin file headers.

Daily Workflow: Three Commands

Once the pipeline is set up, your daily work uses three commands from the commit-push-pr skill set:

/sco — Semantic Commit

Analyzes your diff, picks the right type and scope, stages specific files, and commits:

feat(search): add fuzzy matching helper
fix(cart): correct tax calculation to include base price
refactor(admin): extract settings into dedicated options handler

Stages files by name — never git add .. No secrets committed. Imperative mood, max 72 chars.

/spr — Branch → Commit → Push → PR

The full flow in one command. Creates a semantic branch name, commits, pushes with upstream tracking, and opens a PR with the correct title:

Branch:  feat/add-search-filter
Commit:  feat(search): add result filtering
PR:      feat(search): add result filtering

The PR body includes a summary and release impact type.

/spu — Push

Pushes the current branch to origin with upstream tracking. That’s it.

Why the PR title is everything

With Squash & Merge, GitHub flattens your branch into a single commit using the PR title as the commit message. Semantic Release reads that message to decide the version bump. The PR title is the only thing that determines your next version number.

Conventional Commits Reference

PrefixMeaningVersion Change
feat:New featureminor (1.x.0)
fix:Bug fixpatch (1.0.x)
perf:Performance improvementpatch
docs:Documentation onlynone
style:Code formattingnone
refactor:Refactoringnone
chore:Maintenance tasksnone
feat!: / BREAKING CHANGE:Breaking changemajor (x.0.0)

The Full Flow

sequenceDiagram
    participant Dev as Developer
    participant CC as Claude Code
    participant GH as GitHub
    participant GHA as GitHub Actions
    participant Rel as Release

    Dev->>CC: /spr (or /sco + /spu)
    CC->>CC: Analyze diff → pick type & scope
    CC->>GH: Create branch, commit, push, open PR
    GH->>GH: PR Lint validates title ✓
    Dev->>GH: Squash & Merge
    GH->>GHA: Trigger release workflow
    GHA->>GHA: Bump version in style.css
    GHA->>GHA: Update CHANGELOG.md
    GHA->>Rel: Publish v1.2.0 + ZIP asset

Post-Setup: GitHub Settings

After the skill generates the files, configure your repository:

  1. Squash merge only — Settings → General → Pull Requests: enable “Allow squash merging” (default to PR title), disable merge commits and rebase merging.
  2. Branch protection — Settings → Branches: require “Validate PR title” status check before merging.

First release gotcha: On some repos, the first squash-merge may not trigger the Release workflow. If it doesn’t fire, push an empty commit directly: git commit --allow-empty -m "ci: trigger release workflow" && git push. Subsequent merges work fine.

Summary

One skill sets up the pipeline. Three commands handle the rest:

/wordpress-theme-semantic-github-deployment  →  one-time setup
/sco                                         →  semantic commit
/spr                                         →  branch + commit + push + PR
/spu                                         →  push

Your team focuses on code. The robots handle versioning, changelogs, and releases.

M
Written by

Mateusz Zadorozny

SHIFT64 Founder. WooCommerce performance specialist helping store owners achieve faster load times and better conversions.