Skip to content

Switch release workflow to manual trigger with version input - #16

Merged
roborourke merged 2 commits into
mainfrom
claude/release-workflow-manual-trigger-38f8ig
Aug 12, 2026
Merged

roborourke merged 2 commits into
mainfrom
claude/release-workflow-manual-trigger-38f8ig

Conversation

@roborourke

@roborourke roborourke commented Aug 7, 2026 •

Copy link
Copy Markdown
Collaborator

What & why

The old release.yml triggered on release: created. Because the release already existed at a tag, the workflow had to build the plugin, commit the compiled assets, and then force-push the tag to move it onto the new commit. Retagging + force-pushing is the behaviour we wanted to get rid of — it breaks Packagist's tag immutability and is generally fragile.

This mirrors the change already made in hm-query-loop: the release is now cut from a manual workflow_dispatch with a version input. The tag is created exactly once, already pointing at the built and versioned code, and is never moved or force-pushed.

Changes

.github/workflows/release.yml:

  • Trigger changed from on: release: created to on: workflow_dispatch with a required version input (X.Y.Z, no leading v).
  • Validates the version format and refuses to proceed if the v<version> tag already exists.
  • Checks out main, runs npm ci && npm run build, and stamps the version into popup.php (__VERSION__ placeholder).
  • Force-adds the gitignored build/ output so the tagged tree is self-contained, commits, creates an annotated tag once, and pushes only that tag — no force push.
  • Builds popup.zip via the existing npm run plugin-zip script and publishes a GitHub release (with generated notes) using softprops/action-gh-release@v2.

How to use

Run the Release workflow from the Actions tab and supply the version (e.g. 1.2.3).

Notes

  • Kept this repo's existing npm run plugin-zip mechanism rather than the git archive approach hm-query-loop uses, since this repo has no .gitattributes and plugin-zip was already the established tooling here.
  • build-and-release.yml (the release-branch mirror on push to main) is unchanged.

Generated by Claude Code

Open WordPress Playground Preview

Replace the release-created trigger, which retagged and force-pushed to
commit the built plugin onto the tag, with a manual workflow_dispatch that
takes a version number input. The tag is now created exactly once, already
pointing at the built and versioned code, and is never moved or
force-pushed — matching the approach taken in hm-query-loop and satisfying
Packagist's tag immutability requirement.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JuiSYc2zyC3snrT5wKS1iA
@github-actions

github-actions Bot commented Aug 7, 2026 •

Copy link
Copy Markdown

Playwright E2E Test Results (PHP 8.4, WP latest)

passed  25 passed

Details

stats  25 tests across 3 suites
duration  2 minutes, 42 seconds
commit  62797c5

@roborourke
roborourke marked this pull request as ready for review August 7, 2026 10:12
@roborourke
roborourke requested a review from bucur-marian August 7, 2026 10:13
Add a Release Process section covering the new manually-triggered
workflow: how to run it, what it does step by step, and why tags are
immutable (Packagist compatibility).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JuiSYc2zyC3snrT5wKS1iA
github-actions Bot added a commit that referenced this pull request Aug 7, 2026
@roborourke
roborourke merged commit d635815 into main Aug 12, 2026
4 checks passed
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