Skip to content

Set up release-please for automated versioning and releases#54

Draft
josephfusco wants to merge 4 commits into
mainfrom
chore/release-please
Draft

Set up release-please for automated versioning and releases#54
josephfusco wants to merge 4 commits into
mainfrom
chore/release-please

Conversation

@josephfusco

@josephfusco josephfusco commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Automates version bumps, changelog, tagging, and the release zip from Conventional Commits.

  • release-please owns the manifest, CHANGELOG.md, and the tag/release.
  • scripts/sync-versions.sh reads the version from the manifest and seds it into the three WordPress-parsed places that can't carry an x-release-please-version marker (plugin header Version:, WP_PRESENCE_VERSION define, readme.txt Stable tag:). Same script CI runs and a maintainer can run locally.
  • One workflow replaces the old release.yml: runs release-please on push to main, runs the sync script on every release PR, builds + uploads the plugin zip when the release is cut.
  • CONTRIBUTING.md documents Conventional Commits and the sync script.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 4.7
Used for: Porting the wp-graphql release-please pattern into a single-package config and extracting the version sync into a script. All changes were reviewed and verified by me.

@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown

▶ Preview in WordPress Playground

Open in WordPress Playground

Boots a fresh WordPress with this PR's presence-api build, seeds 5 demo users, and drops you on the dashboard.

Stress-test variant: 40 demo users · Built from 8d5882fb903cb429c6b2e572f07b976cd67ed78c. Auto-updates when you push.

- release-please handles the manifest, CHANGELOG, and tag/release on
  merge of its release PR.
- scripts/sync-versions.sh syncs the version from the manifest into the
  three WP-parsed locations (plugin header Version:, WP_PRESENCE_VERSION
  define, readme.txt Stable tag) — same script the release-please
  workflow runs in CI and a maintainer runs locally.
- One .github/workflows/release-please.yml replaces the old release.yml:
  runs release-please on push to main, runs the sync script on each
  release PR, builds and uploads the plugin zip when the release is cut.
- CONTRIBUTING.md documents Conventional Commits and the sync script.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Introduces release-please-based automation to manage versioning, changelog/tagging, and GitHub Releases for the Presence API WordPress plugin, including a CI-driven sync of WordPress-specific version strings and automated zip asset publishing.

Changes:

  • Add release-please manifest + config to drive Conventional Commit-based version bumps and tagging.
  • Add a version sync script to propagate the manifest version into WordPress-parsed version fields.
  • Replace the legacy tag-triggered release workflow with a release-please workflow that updates release PRs and uploads the built zip on release creation.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
scripts/sync-versions.sh Adds a script to sync the canonical version from the release-please manifest into plugin/readme version fields.
release-please-config.json Adds release-please configuration for a single-package repo.
.release-please-manifest.json Adds the release-please manifest (canonical version source).
.github/workflows/release.yml Removes the old tag-triggered GitHub Release workflow.
.github/workflows/release-please.yml Adds a new workflow to run release-please, sync versions in release PRs, and upload the zip asset on release creation.
.github/CONTRIBUTING.md Documents the release process, Conventional Commits, and the version sync script.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/sync-versions.sh
Comment thread .github/workflows/release-please.yml Outdated
Comment thread .github/workflows/release-please.yml
josephfusco and others added 3 commits June 18, 2026 14:16
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Comment thread scripts/sync-versions.sh
#
# bash scripts/sync-versions.sh
#
# Each target line is grep-checked before the sed so a silent miss fails loudly.
Comment thread scripts/sync-versions.sh
Comment on lines +36 to +43
# `sed -i.bak` works on both GNU sed (Linux CI) and BSD sed (macOS dev).
sed -i.bak "s|^ \* Version: .*$| * Version: ${VERSION}|" presence-api.php
sed -i.bak "s|^\(define( 'WP_PRESENCE_VERSION', '\)[^']*\(' );\)|\1${VERSION}\2|" presence-api.php
sed -i.bak "s|^Stable tag: .*$|Stable tag: ${VERSION}|" readme.txt

rm -f presence-api.php.bak readme.txt.bak

echo "Synced all version references to ${VERSION}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants