Skip to content

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

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

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

Conversation

@roborourke

@roborourke roborourke commented Aug 7, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The previous release.yml fired on GitHub release creation (release: [created]). It then re-built the plugin, stamped the version, made a new commit, deleted the existing tag, recreated it, and force-pushed it so the tag pointed at the built, versioned code.

Moving a tag like this breaks Packagist, which requires tags to be immutable. This mirrors the same issue we fixed in hm-query-loop.

Change

Replace the release-triggered workflow with a manually dispatched one (workflow_dispatch) that takes a version input:

  • Manual trigger — run it from the Actions tab and supply the version to cut (e.g. 1.2.3, no leading v).
  • Version validation — rejects anything not in X.Y.Z format.
  • Immutability guard — fails early if the tag already exists, rather than clobbering it.
  • Build + stamp — npm ci && npm run build, then sed the version into the Version: header of hm-url-tabs.php.
  • Tag created exactly once — the release commit (with force-added build/) is committed, tagged, and only the tag is pushed. Never moved, never force-pushed.
  • Distribution ZIP — produced with git archive, honouring the .gitattributes export-ignore rules so ZIP contents are defined in one place and match the tagged tree.
  • GitHub release — published via softprops/action-gh-release@v2 with auto-generated release notes and the ZIP attached.

This matches the approach now used in hm-query-loop. Only release.yml changed; build-and-release.yml (which maintains the release branch on push to main) is untouched.

Testing

  • Validated the workflow YAML parses.
  • Behaviour otherwise verified by parity with the equivalent, already-merged workflow in hm-query-loop.

Generated by Claude Code

Open WordPress Playground Preview

The old release workflow fired on GitHub release creation, then rebuilt,
re-tagged, and force-pushed the tag so it pointed at the built, versioned
code. Moving a tag breaks Packagist, which requires tags to be immutable.

Replace it with a manually dispatched workflow that takes a version input,
builds and stamps the version, and creates the tag exactly once so it never
needs to be moved or force-pushed. The distribution ZIP is now produced with
git archive honouring the .gitattributes export-ignore rules, matching the
approach used in hm-query-loop.

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

github-actions Bot commented Aug 7, 2026 •

Copy link
Copy Markdown

Playwright test results

skipped  10 skipped

Details

stats  10 tests across 2 suites
duration  9.6 seconds
commit  91ebd95

Skipped tests

chromium › multiple-endpoints.spec.js › Multiple endpoints - EP_CATEGORIES overview endpoint › Editor endpoint selector › endpoint selector appears in Tab Visibility panel with multiple registered endpoints
chromium › multiple-endpoints.spec.js › Multiple endpoints - EP_CATEGORIES overview endpoint › Editor endpoint selector › tab dropdown filters by selected endpoint
chromium › multiple-endpoints.spec.js › Multiple endpoints - EP_CATEGORIES overview endpoint › Editor endpoint selector › duplicate navigation blocks do not duplicate tabs in dropdown
chromium › multiple-endpoints.spec.js › Multiple endpoints - EP_CATEGORIES overview endpoint › category archive loads without endpoint
chromium › multiple-endpoints.spec.js › Multiple endpoints - EP_CATEGORIES overview endpoint › category archive loads with overview endpoint (no value)
chromium › multiple-endpoints.spec.js › Multiple endpoints - EP_CATEGORIES overview endpoint › category archive loads with overview endpoint and tab value
chromium › multiple-endpoints.spec.js › Multiple endpoints - EP_CATEGORIES overview endpoint › overview endpoint is distinct from tab endpoint on category archive
chromium › tab-navigation.spec.js › HM URL Tabs › should register tab variations for navigation links
chromium › tab-navigation.spec.js › HM URL Tabs › should show tab visibility controls when page has tabs
chromium › tab-navigation.spec.js › HM URL Tabs › should generate tab URLs correctly

@roborourke
roborourke marked this pull request as ready for review August 7, 2026 10:24
Adds a Release Process section describing the manually dispatched Release
workflow: how to trigger it, the required semver version input, and the
immutable-tag guarantee that keeps releases compatible with Packagist.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nyu8Q9MCsyQuFcQd7sd2hK
github-actions Bot added a commit that referenced this pull request Aug 7, 2026
@roborourke
roborourke requested a review from mattheu August 11, 2026 15:22
@roborourke
roborourke merged commit c26f2b6 into main Aug 12, 2026
8 checks passed
@roborourke
roborourke deleted the claude/release-workflow-manual-trigger-c673e2 branch August 12, 2026 18:43
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