ci: Auto-update manifest.json on new releases#41
Open
enyineer wants to merge 8 commits intoMoonfin-Client:masterfrom
Open
ci: Auto-update manifest.json on new releases#41enyineer wants to merge 8 commits intoMoonfin-Client:masterfrom
enyineer wants to merge 8 commits intoMoonfin-Client:masterfrom
Conversation
… on release. Signed-off-by: enyineer <nico.enking@gmail.com>
…t "Moonfin.Server-" zip files Signed-off-by: enyineer <nico.enking@gmail.com>
…upsert version entries for published or edited releases. Signed-off-by: enyineer <nico.enking@gmail.com>
Signed-off-by: enyineer <nico.enking@gmail.com>
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.
Summary
Adds a GitHub Actions workflow that automatically updates
manifest.jsonwhenever a GitHub Release is published, edited, or deleted — no more manual edits to the versions array.How It Works
The workflow triggers on three
releaseevent types:published— New version added1.7.0→1.7.0.0), stripping anyvprefix and appending.0if neededtargetAbifrom theJellyfin.ControllerPackageReference inbackend/Moonfin.Server.csprojMoonfin.Server-*.zipasset attached to the release and computes its MD5 checksum (uppercase)created_atfield.[0].versionsinmanifest.jsonusingjqedited— Version entry updatedWhen a release is edited (e.g. release notes changed), the workflow upserts the version entry — it removes the existing entry with the matching version and prepends a freshly built one. This also handles edge cases where assets were re-uploaded.
deleted— Version entry removedWhen a release is deleted, the workflow removes the matching version entry from the
versionsarray.Field Mapping
version1.7.0→1.7.0.0)changelogtargetAbiJellyfin.Controllerversion from.csproj+.0sourceUrlMoonfin.Server-*.zipasset download URL from the releasechecksumtimestampcreated_at→YYYY-MM-DDTHH:MM:SSdependencies[]Changelog Sanitization
GitHub release bodies use rich markdown (headers, bold, badges, links, code ticks), but Jellyfin renders the changelog as plain text. The workflow automatically strips markdown to produce clean output:
Before (raw release body):
After (sanitized for manifest):
Benefits
env:variablesMoonfin.Server-*.ziprather than any.zipgit pull --rebasebefore pushTested
All event types and changelog sanitization tested on a fork:
publishedediteddeletedpublished+ sanitization