Conversation
…#320) Incorporates #317 (filed from the Financial-Modeling standup): the template's publisher carried no pre-release validation gate because the PR lint was inlined - the reference could not express the gate the spec (and Financial-Modeling#14's acceptance criteria) require, forcing downstream divergence from the verbatim carry. ## Changes - **`validate-task.yml` (new, `workflow_call`)** - the lint job moves verbatim; the file/name shape matches the downstream `validate-task.yml` pattern so carries align. - **`test-pull-request.yml`** - the `validate` job `uses:` the task. **The ruleset-bound aggregator keeps its exact name** (`Check pull request workflow status job` binds by name and stays an inline job); its `needs:`/result checks point at `validate`. - **`publish-release.yml`** - gains `validate` (same reusable task) and `publish.needs: [validate]`: a manual dispatch can no longer cut a release from a ref that fails validation. - **`WORKFLOW.md`** source-only walkthrough states the gate, so the spec and the reference implementation agree and the next downstream re-sync is byte-for-byte. ## Validation - actionlint clean; workflow YAML LF; ruleset-bound check context unchanged. Closes #317 (fires on promotion). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aligns the template's source-only release publisher with the spec by factoring the existing PR validation/lint logic into a reusable workflow and reusing it as a hard pre-release gate. This ensures a manual workflow_dispatch cannot publish a release from a ref that fails the same validation used to gate PR merges.
Changes:
- Added a reusable
.github/workflows/validate-task.yml(workflow_call) containing the repo's lint/validation steps. - Updated
.github/workflows/test-pull-request.ymlto call the reusable validation task while keeping the ruleset-bound aggregator job name unchanged. - Updated
.github/workflows/publish-release.ymltoneeds:the same reusable validation task before publishing, and documented the gating behavior inWORKFLOW.md.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| WORKFLOW.md | Documents that dispatch-only publishers gate release on the reusable validation task to prevent releasing invalid refs. |
| .github/workflows/validate-task.yml | New reusable validation workflow encapsulating lint/spec/registry checks for reuse by PR CI and the publisher. |
| .github/workflows/test-pull-request.yml | Replaces the inlined lint job with a uses: call to validate-task.yml, keeping the required aggregator job intact. |
| .github/workflows/publish-release.yml | Adds a validate job using validate-task.yml and makes publish depend on it, enforcing pre-release validation on dispatch. |
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.
Promotes #320 (the #317 incorporation): validation factored into a reusable validate-task.yml, called by the PR workflow (ruleset-bound aggregator unchanged) and by publish-release, so a manual dispatch cannot cut a release from a ref that fails validation. WORKFLOW.md source-only walkthrough states the gate.
Closes #317.
🤖 Generated with Claude Code