Skip to content

Publish exact-head compiled CSS and jsgrps from Compile Assets - #16999

Open
Ibochkarev wants to merge 1 commit into
modxcms:3.xfrom
Ibochkarev:feat/16998-compile-assets-artifact
Open

Publish exact-head compiled CSS and jsgrps from Compile Assets#16999
Ibochkarev wants to merge 1 commit into
modxcms:3.xfrom
Ibochkarev:feat/16998-compile-assets-artifact

Conversation

@Ibochkarev

@Ibochkarev Ibochkarev commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

What changed and why

Compile Assets already builds Manager CSS/JS on relevant PRs, but nothing was downloadable afterward. Reviewers had a green check and still needed a local Node/Grunt run to exercise compress_js Manager mode.

The workflow now:

  • checks out the exact PR/push head SHA;
  • builds as before;
  • uploads an allowlisted set via standard actions/upload-artifact@v4 (index/login/installer CSS + min counterparts, plus manager/assets/modext/modx.jsgrps-min.js);
  • writes compiled-assets-manifest.json inline in the workflow step (schema version, repo, PR number, head/base SHAs, run id/attempt, output sizes/SHA-256, ordered jsgrps input map).

Triggers also cover mapped Manager JS under manager/assets/modext/** and FileAPI.js. permissions: contents: read and persist-credentials: false keep the untrusted build surface smaller.

Not a custom maintained tool: there is no .github/scripts/* helper to own long-term. That is intentional after #16971 (maintainers closed a custom PHPCS wrapper as something the project should not maintain). Here the only non-standard bit is a short inline Python block inside the workflow for the JSON manifest; upload stays on stock actions/upload-artifact@v4 with an explicit path list.

How to test

  1. Open this PR (or any PR that touches _build/templates/** / mapped modext JS) and wait for Compile Assets.
  2. On the run page, download artifact compiled-assets-<head12>.
  3. Confirm it contains the six CSS files, modx.jsgrps-min.js, and compiled-assets-manifest.json.
  4. Check the manifest head_sha matches the PR head and outputs / jsgrps_inputs hashes look sane.

Related issue(s)/PR(s)

Resolves #16998.
Addresses the jsgrps ask in #16998 (comment).
Avoids the “custom script to maintain” rejection pattern from #16971 / #16971.

Compatibility notes

CI workflow only. No runtime or platform changes.

Breaking change assessment

No public API or product behavior changes. Safe for a patch release.

Test coverage

No product unit tests. Verification is the workflow run + downloaded artifact contents.

Contributors

Issue #16998; jsgrps follow-up from @opengeek.

AI tool use

AI helped draft the workflow and PR text. Reviewers should treat the workflow YAML as the source of truth.

Upload allowlisted build outputs via actions/upload-artifact and an
inline manifest so PR reviewers can download compiled Manager assets
without a local Node/Grunt run.
@Ibochkarev
Ibochkarev force-pushed the feat/16998-compile-assets-artifact branch from dde91f0 to d5720cf Compare August 16, 2026 05:49

@Mark-H Mark-H left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Publish exact-head compiled CSS from the Compile Assets workflow

2 participants