Create GitHub Release on every npm publish#3429
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an automated GitHub Release step after successful npm publishes (via the existing changelog-update workflow), so watchers can subscribe to release notifications.
Changes:
- Introduces a new GitHub Actions workflow triggered by
workflow_runafter “Update CHANGELOG.md” completes ontrunk - Reads the version from
lerna.json, extracts the matching section fromCHANGELOG.md, and publishes a GitHub Release viagh
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
When we publish packages to npm, people who depend on WordPress Playground don't have an easy way to find out. GitHub Releases are the standard way to announce new versions – users can subscribe via Watch → Releases. This workflow triggers after the changelog update (which itself triggers after npm publish), reads the version from lerna.json, extracts the matching CHANGELOG.md section, and creates a GitHub Release with the changelog and a link to npm. No binary assets are attached.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Creates an empty GitHub Release (no binary downloads) whenever the npm release workflow succeeds on trunk. The release includes the changelog section for that version and a link to npm. Previously this was chained off the Update CHANGELOG.md workflow, which could trigger from self-hosted releases too – not just npm. Now it triggers directly off "Release NPM packages" so a GitHub Release is only created when packages actually ship to npm.
1a9ce4f to
368631e
Compare
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
The CHANGELOG.md headings look like "## [v3.1.13] (2026-03-23)" but the awk pattern was doing an exact line match against "## [v3.1.13]", which never matched. Switch to index() prefix matching so the date suffix is ignored.
Collaborator
Author
|
CI failures seem completely unrelated. Let's give it a try. |
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.
What it does
Creates a GitHub Release automatically after every npm publish. The release has no binary assets – just the changelog for that version, an
npm installcommand, and a note about subscribing to releases via Watch → Custom → Releases.Rationale
People who depend on WordPress Playground don't have an easy way to know when a new version ships. GitHub Releases are the standard mechanism for this – they show up in the repo's release feed and anyone watching releases gets notified.
Implementation
New workflow
.github/workflows/publish-github-release.ymlthat:workflow_runafter the Release NPM packages workflow succeeds ontrunklerna.jsonCHANGELOG.mdusingawkgh release createwith--target trunkTriggering directly off the npm release workflow (instead of the changelog workflow) ensures we only create a GitHub Release when packages actually ship to npm — not when the changelog updates for other reasons like self-hosted releases.
Testing instructions
WordPress Playground vX.Y.Z, the body has the changelog and npm link, and there are no attached assets