Reincorporate template publish-dispatch guards and JSON casing fix#759
Merged
Conversation
Re-sync the upstream ProjectTemplate fixes (ptr727/ProjectTemplate#184/#185, Fixes #181/#182/#183) that resolved the publish-dispatch mis-versioning defect surfaced while re-syncing this downstream. - publish-release.yml: fail fast when a publish is dispatched on a non-default ref; the matrix builds both branches, so a non-default dispatch mis-versions the main leg and publishes a malformed non-prerelease "Latest". - build-release-task.yml: refuse to create a main release whose SemVer2 carries a prerelease suffix (root-cause-agnostic safety net). - .editorconfig: correct JSON/JSONC casing in the section comment. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR re-syncs upstream ProjectTemplate fixes to harden the release publishing workflows against mis-versioning when manually dispatched from a non-default ref, and aligns .editorconfig JSON comment casing with established documentation conventions.
Changes:
- Add a fail-fast guard in
publish-release.ymlto preventworkflow_dispatchruns from non-default refs (since schedule/dispatch builds bothmainanddevelopin the matrix). - Add a safety-net check in
build-release-task.ymlthat refuses to publish amainGitHub release ifSemVer2contains a prerelease suffix. - Fix
.editorconfigsection comment casing for JSON/JSONC.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .github/workflows/publish-release.yml | Blocks manual dispatch on non-default refs to avoid main leg mis-versioning in the two-branch publish matrix. |
| .github/workflows/build-release-task.yml | Adds a guardrail to prevent publishing a public (main) release with a prerelease SemVer2. |
| .editorconfig | Normalizes JSON/JSONC comment casing to JSON / JSONC. |
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.
Re-sync the upstream ProjectTemplate fixes (ptr727/ProjectTemplate#184 / #185, which
Fixes #181/#182/#183) that resolved the publish-dispatch mis-versioning defect surfaced while re-syncing this downstream onto the template.Changes
publish-release.yml: fail fast when a publish is dispatched on a non-default ref. The matrix builds both branches regardless of the triggering ref, so a non-default dispatch mis-versions themainleg and publishes a malformed non-prerelease release that GitHub marks "Latest".build-release-task.yml: refuse to create amainrelease whoseSemVer2carries a prerelease suffix (root-cause-agnostic safety net backing the dispatch-ref guard)..editorconfig: correct JSON/JSONC casing in the section comment (CODESTYLE official-casing rule).The fourth file in the upstream commit (
build-pypilibrary-task.yml) does not apply — PlexCleaner is not a Python library. Workflow/governance changes only; no version bump.🤖 Generated with Claude Code