ci: release automatically when the version changes

A push to main whose build.yaml version has no tag yet creates the tag and
a release with the plugin zip and an updated repository manifest.
This commit is contained in:
2026-11-13 18:16:22 +01:00
parent 383b90d9b8
commit 7f357cb46c
4 changed files with 86 additions and 29 deletions
+12 -7
View File
@@ -19,9 +19,8 @@ Watch-time stats are collected on the server and cover all clients.
### From a plugin repository
1. Host the plugin zip and a `manifest.json` somewhere your server can reach (see [Hosting your own repository](#hosting-your-own-repository)).
2. In Jellyfin: **Dashboard → Plugins → Manage Repositories → New Repository**, enter the URL of your `manifest.json`.
3. Install **Herald** from the catalogue and restart the server.
1. In Jellyfin: **Dashboard → Plugins → Manage Repositories → New Repository**, enter `https://github.com/JoshiCodes/jellyfin-Herald/releases/latest/download/manifest.json`.
2. Install **Herald** from the catalogue and restart the server.
### Manually
@@ -178,18 +177,24 @@ jprm plugin build . --output artifacts
This writes `artifacts/herald_<version>.zip`. The Jellyfin version, target framework and SQLite version are set in `Directory.Build.props`; `targetAbi` is in `build.yaml`.
Pushing a tag such as `v1.0.0` runs the GitHub Actions workflow, which builds, tests, packages and attaches the zip to the release of that tag.
## Releasing
The version lives in `build.yaml` (`version`) and `Directory.Build.props` (`Version`, `AssemblyVersion`, `FileVersion`); keep them equal, the workflow fails otherwise. Put the release notes in `changelog` in `build.yaml`.
Every push to `main` builds and tests. If the version has no `v<version>` tag yet, the workflow also creates that tag and a GitHub release with two assets: the plugin zip and a `manifest.json` that lists this and all earlier releases. So a release is: bump the version, push.
## Hosting your own repository
`manifest.json` in this repository is a sample. Replace the checksum (MD5 of the zip) and the timestamp, or let jprm write it:
The `manifest.json` attached to the latest release is a complete plugin repository; the URL under [Installation](#installation) always points at it. The `manifest.json` in the source tree is only a sample of the format.
To host it elsewhere, build the manifest yourself:
```sh
jprm repo init ./repo
jprm repo add --plugin-url https://github.com/JoshiCodes/jellyfin-Herald/releases/download/v1.0.0/herald_1.0.0.0.zip ./repo artifacts/herald_1.0.0.0.zip
jprm repo add --plugin-url https://example.org/herald/herald_1.0.0.0.zip ./repo artifacts/herald_1.0.0.0.zip
```
Serve the resulting `manifest.json` over HTTP(S) and add its URL in Jellyfin as described above.
Serve the resulting `manifest.json` and the zip over HTTP(S) and add the manifest URL in Jellyfin.
## License