Skip to content

ci(12.0): auto-release on segment-editor master updates via dispatch#13

Merged
rlauuzo merged 1 commit into
12.0from
capy/ci120-auto-release-on
Jul 17, 2026
Merged

ci(12.0): auto-release on segment-editor master updates via dispatch#13
rlauuzo merged 1 commit into
12.0from
capy/ci120-auto-release-on

Conversation

@rlauuzo

@rlauuzo rlauuzo commented Jul 17, 2026

Copy link
Copy Markdown
Member

Enables automatic releases of the Jellyfin 12 plugin build whenever segment-editor master changes. Scheduled and repository_dispatch workflows only ever run from the default branch, so this branch's release workflow never fired on its own — and when run manually it pushed version bumps to master and tagged releases against the v1.0.x series, which would have clobbered master's releases.

  • release.yml is now workflow_dispatch-only, designed to be dispatched on ref 12.0 by master's 30-minute release cron (companion PR on master adds that dispatch job)
  • Releases only happen when the recorded segment-editor master SHA actually changed (or force_release is set), so the forwarded 30-minute dispatches are no-ops when upstream is unchanged
  • Version bumps are pushed back to the branch the workflow ran on (github.ref_name) instead of the default branch, and the release tag targets the exact built commit
  • Directory.Build.props is seeded to 12.0.0.0, giving this branch its own v12.0.x.0 tag series with no collisions against master's v1.0.x.0; the first auto-release will be v12.0.1.0 with targetAbi: 12.0.0.0, which the manifest repo's daily updater routes into 12.0/manifest.json automatically
  • Concurrency group renamed to release-plugin-12.0 so 12.0 releases don't queue behind master's

Merge this before the master-branch companion PR: the old workflow on this branch released unconditionally on dispatch and pushed to the default branch.

Open INTRO-102 INTRO-102

Summary by Sourcery

Adjust 12.0 plugin release workflow to be manually dispatchable from master and safely auto-release on segment-editor updates without affecting master’s release stream.

Build:

  • Limit the 12.0 release workflow to workflow_dispatch and drive it via dispatches from the master branch’s release cron.
  • Update the workflow’s concurrency group to be specific to the 12.0 plugin releases so they no longer contend with master releases.

CI:

  • Gate releases on changes to the recorded upstream segment-editor master SHA or an explicit force_release input so periodic dispatches are no-ops when upstream is unchanged.
  • Push version bumps back to the branch the workflow runs on and tag releases against the exact built commit instead of the default branch.

Chores:

  • Seed the plugin versioning for this branch to its own 12.0.x series to avoid collisions with master’s v1.0.x tags.

…eries

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@rlauuzo rlauuzo added the capy Generated by capy.ai label Jul 17, 2026 — with Capy AI
@sourcery-ai

sourcery-ai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR reworks the 12.0 branch release workflow so it is only triggered via workflow_dispatch from master’s cron, only performs releases when the upstream segment-editor master SHA changes (or force_release is set), correctly pushes version bumps and tags to the 12.0 branch and built commit, seeds the branch-specific version series, and isolates its concurrency from master’s releases.

Sequence diagram for auto-release workflow_dispatch on 12.0 branch

sequenceDiagram
  participant MasterCron as master_release_workflow
  participant Release12 as release_plugin_workflow_12_0
  participant Repo12 as git_repo_12_0
  participant GHRel as github_releases

  MasterCron->>Release12: workflow_dispatch(ref=12.0)

  Release12->>Repo12: [read UPSTREAM_SHA and LAST_SHA]
  alt [UPSTREAM_SHA changed or inputs.force_release]
    Release12->>Repo12: git push origin HEAD:github.ref_name
    alt [release tag exists]
      Release12->>GHRel: gh release upload
    else [release tag missing]
      Release12->>Repo12: git rev-parse HEAD
      Release12->>GHRel: gh release create --target HEAD
    end
  else [no upstream change]
    Release12->>Release12: [exit without release]
  end
Loading

File-Level Changes

Change Details Files
Restrict the 12.0 release workflow to manual dispatch and make it safe as a downstream of master’s scheduled dispatches.
  • Remove schedule and repository_dispatch triggers so the workflow is only started via workflow_dispatch
  • Document that releases on 12.0 are driven by master’s release workflow via dispatch
  • Simplify SHOULD_RELEASE logic to depend solely on upstream SHA changes or force_release input, independent of event type
.github/workflows/release.yml
Align release behavior with the branch and commit that actually built, including prerelease handling and tag targeting.
  • Change git push to push version bump commits to the current ref (github.ref_name) instead of the default branch
  • Always honor the prerelease input regardless of event_name, building a PRERELEASE_FLAG string for gh release commands
  • Resolve the target SHA with git rev-parse HEAD and use it as the gh release target instead of the default branch
.github/workflows/release.yml
Isolate 12.0 plugin releases from master’s concurrency and versioning, giving this branch its own version/tag series.
  • Rename the workflow concurrency group from release-plugin to release-plugin-12.0 so 12.0 jobs don’t queue behind master
  • Initialize Directory.Build.props version metadata for the 12.0 line (e.g., Version 12.0.0.0 / corresponding target ABI) to create a v12.0.x.0 tag series distinct from v1.0.x.0
.github/workflows/release.yml
Directory.Build.props

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@kilo-code-bot

kilo-code-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • .github/workflows/release.yml - 0 issues
  • Directory.Build.props - 0 issues

Note: This PR is a CI/release-workflow and version-seeding change. The .NET/C# design-pattern review checklist does not apply to these files. The changed lines were reviewed against the stated intent (make the 12.0 release dispatch-driven, gate on upstream SHA change / force_release, push version bumps to the running branch, and tag releases against the built commit).

Verified changes are correct for the new workflow_dispatch-only trigger model:

  • SHOULD_RELEASE simplification is sound now that schedule/repository_dispatch are removed.
  • git push origin HEAD:${{ github.ref_name }} correctly targets the dispatched branch instead of the default branch.
  • gh release create --target "$TARGET_SHA" (via git rev-parse HEAD) correctly targets the built commit.
  • PRERELEASE_FLAG honors the prerelease input regardless of event type.
  • Concurrency group release-plugin-12.0 and Directory.Build.props version 12.0.0.0 establish the isolated v12.0.x series as described.

Reviewed by hy3:free · Input: 35.5K · Output: 2.3K · Cached: 100.2K

@rlauuzo
rlauuzo merged commit f61db55 into 12.0 Jul 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capy Generated by capy.ai

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant