Set up release-please for automated versioning and releases#54
Draft
josephfusco wants to merge 4 commits into
Draft
Set up release-please for automated versioning and releases#54josephfusco wants to merge 4 commits into
josephfusco wants to merge 4 commits into
Conversation
▶ Preview in WordPress PlaygroundBoots 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 |
- 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.
5730c88 to
7beffa7
Compare
Contributor
There was a problem hiding this comment.
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.
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>
| # | ||
| # bash scripts/sync-versions.sh | ||
| # | ||
| # Each target line is grep-checked before the sed so a silent miss fails loudly. |
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}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automates version bumps, changelog, tagging, and the release zip from Conventional Commits.
CHANGELOG.md, and the tag/release.scripts/sync-versions.shreads the version from the manifest andseds it into the three WordPress-parsed places that can't carry anx-release-please-versionmarker (plugin headerVersion:,WP_PRESENCE_VERSIONdefine,readme.txtStable tag:). Same script CI runs and a maintainer can run locally.release.yml: runs release-please on push tomain, runs the sync script on every release PR, builds + uploads the plugin zip when the release is cut.CONTRIBUTING.mddocuments 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.