Skip to content

Restructure studio frontend CI: centralize on shared reusable workflows#1119

Open
berfinyuksel wants to merge 2 commits into
2026.xfrom
generic-fe-build
Open

Restructure studio frontend CI: centralize on shared reusable workflows#1119
berfinyuksel wants to merge 2 commits into
2026.xfrom
generic-fe-build

Conversation

@berfinyuksel

@berfinyuksel berfinyuksel commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Restructure studio frontend CI: centralize on shared reusable workflows

Moves ~200 lines of build/publish logic into workflows-collection-public. This repo keeps two thin callers.

Files changed

File Change
studio-frontend-build.yaml New — builds and commits the studio bundle
frontend-publish-unified.yaml Rewritten — single funnel for canary + release npm publishing
frontend-build-pr.yaml Deleted
shared-frontend-build.yaml Deleted
shared-npm-publish.yaml Deleted

Key behavior changes

  • Builds only trigger on assets/studio/** changes, not on every branch push.
  • Canary publishes only when frontend files actually changed — a gate job diffs assets/studio/** before publishing.
  • Canary publishes from every version branch (mainline 2026.x and maintenance 2026.1/2026.2/2.4, …) but only when frontend files actually changed — a gate job diffs assets/studio/** before publishing. Deleting a branch stops its canaries automatically; year-scheme maintenance branches were previously excluded by the branch filters.
  • Canary base version is no longer hardcoded — derived per branch line at publish time (branch names are valid semver ranges): mainline bumps the line's minor (2026.x2026.3.0), maintenance bumps the patch (2026.22026.2.3, 2.42.4.5). Fixes stale 2.4.0-canary.* versions sorting below current releases.- pull_request replaces pull_request_target — fork code no longer runs with a write token.
  • Concurrency control added — builds cancel on new push; publishes serialize to avoid dist-tag races.
  • npm publishes now carry provenance (--provenance).

Important notes for maintainers

  • Do not rename frontend-publish-unified.yaml — the filename is registered as a trusted npm publisher (OIDC). Renaming breaks publishing until npmjs.com admin updates the config.
  • Keep build-output-path set on both reusable calls — the reusable defaults to "." and would commit all changed files otherwise.
  • The gate fails open — if diff base is unavailable (new branch, force push), it publishes rather than silently skipping.

Build-only studio-frontend-build.yaml (triggered on assets/studio changes)
plus a single frontend-publish-unified.yaml funnel that gates canary publishing
on frontend changes and derives per-branch-line canary versions. Removes the
local shared-*.yaml build/publish logic in favour of the reusables in
workflows-collection-public.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Jul 7, 2026

Copy link
Copy Markdown

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

This PR restructures the studio frontend CI by moving the bulk of build/lint/typecheck/publish logic into the shared pimcore/workflows-collection-public repository, leaving this repo with two thin caller workflows. It also commits a freshly rebuilt studio bundle (build hash changed from cc74eb38… to af044134…). The change centralizes CI so shared fixes propagate to all consumers, tightens security by replacing pull_request_target with pull_request, derives canary versions per branch line instead of a hardcoded base, adds concurrency control, and enables npm provenance.

Changes:

  • Adds studio-frontend-build.yaml (builds/commits the bundle on assets/studio/** changes) and rewrites frontend-publish-unified.yaml into a gate + publish funnel that only canary-publishes when frontend files actually changed and derives the canary base version per branch line.
  • Deletes the three local workflows (frontend-build-pr.yaml, shared-frontend-build.yaml, shared-npm-publish.yaml) now superseded by the shared reusable workflows.
  • Regenerates and commits the studio build artifacts under a new build hash (updated manifest.json, mf-manifest.json, mf-stats.json, main.html, exposeRemote.js, and the JS bundles/license files).

Reviewed changes

Copilot reviewed 13 out of 28 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.github/workflows/studio-frontend-build.yaml New thin caller that delegates the build to the shared reusable workflow, scoped to assets/studio/**.
.github/workflows/frontend-publish-unified.yaml Rewritten gate/publish funnel; gates on real frontend diffs, computes per-line canary base, calls shared publish workflow with OIDC.
.github/workflows/frontend-build-pr.yaml Deleted (superseded).
.github/workflows/shared-frontend-build.yaml Deleted (moved to shared repo).
.github/workflows/shared-npm-publish.yaml Deleted (moved to shared repo).
src/Resources/public/studio/build/af044134-…/* New/updated generated bundle artifacts under the new build hash.
src/Resources/public/studio/build/cc74eb38-…/* Old bundle manifest/entrypoints removed as part of the hash swap.

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

permissions:
id-token: write # Required for OIDC
contents: write
uses: pimcore/workflows-collection-public/.github/workflows/reusable-frontend-publish-unified.yaml@main
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.

4 participants