|
1 | | -# Registry: publishing platform-specific plugins |
2 | | - |
3 | | -This repository hosts a simple JSON registry (`registry.json`) that points to downloadable plugin archives. With the single-binary model, each plugin release contains one archive targeted to a specific OS/architecture. |
4 | | - |
5 | | -## Steps to publish |
6 | | - |
7 | | -1. Build the platform-specific archive |
8 | | - - Use the scripts under your plugin directory (example: `plugins/echo`): |
9 | | - - Windows (PowerShell): `./build.ps1 -Version 1.0.0 -Os windows -Arch amd64` |
10 | | - - Linux/macOS (Bash): `VERSION=1.0.0 GOOS=linux GOARCH=amd64 bash build.sh` |
11 | | - - Output: `dist/<name>-plugin-v<version>-<goos>-<goarch>.zip` and a matching `.sha256` file. |
12 | | - |
13 | | -2. Upload the archive to your release hosting |
14 | | - - Example: GitHub Releases for `marchat-plugins`. |
15 | | - - Copy the final download URL of the uploaded archive. |
16 | | - |
17 | | -3. Capture the SHA-256 checksum |
18 | | - - Use the contents of the generated `.sha256` file (the hex digest). |
19 | | - |
20 | | -4. Update `registry.json` |
21 | | - - Keep one entry per plugin. Point `download_url` and `checksum` to the specific platform you are publishing. |
22 | | - - Update `version` and `last_updated` accordingly. |
23 | | - |
24 | | -### Example `registry.json` entry |
25 | | -```json |
26 | | -{ |
27 | | - "version": "1.0.0", |
28 | | - "last_updated": "2025-01-01T00:00:00Z", |
29 | | - "plugins": [ |
30 | | - { |
31 | | - "name": "echo", |
32 | | - "version": "1.0.0", |
33 | | - "description": "Simple echo plugin for testing the plugin system", |
34 | | - "author": "Cod-e-Codes", |
35 | | - "homepage": "https://github.com/Cod-e-Codes/marchat", |
36 | | - "download_url": "https://github.com/Cod-e-Codes/marchat-plugins/releases/download/v1.0.0/echo-plugin-v1.0.0-windows-amd64.zip", |
37 | | - "checksum": "sha256:<hex-digest>", |
38 | | - "category": "utility", |
39 | | - "tags": ["chat", "utility", "echo", "test"], |
40 | | - "min_version": "0.2.0-beta.1" |
41 | | - } |
42 | | - ] |
43 | | -} |
44 | | -``` |
45 | | - |
46 | | -Notes: |
47 | | -- The host validates `GOOS/GOARCH` at runtime and will refuse to launch mismatched binaries with a clear error. |
48 | | -- If you need to support multiple platforms, publish separate releases and update `registry.json` to point at the one most relevant for your audience. The store and `:plugin list` remain unchanged. |
| 1 | +# Registry: publishing platform-specific plugins |
| 2 | + |
| 3 | +This repository hosts a simple JSON registry (`registry.json`) that points to downloadable plugin archives. With the single-binary model, each plugin release contains one archive targeted to a specific OS/architecture. |
| 4 | + |
| 5 | +## Steps to publish |
| 6 | + |
| 7 | +1. Build the platform-specific archive |
| 8 | + - Use the scripts under your plugin directory (example: `plugins/echo`): |
| 9 | + - Windows (PowerShell): `./build.ps1 -Version 1.0.0 -Os windows -Arch amd64` |
| 10 | + - Linux/macOS (Bash): `VERSION=1.0.0 GOOS=linux GOARCH=amd64 bash build.sh` |
| 11 | + - Output: `dist/<name>-plugin-v<version>-<goos>-<goarch>.zip` and a matching `.sha256` file. |
| 12 | + |
| 13 | +2. Upload the archive to your release hosting |
| 14 | + - Example: GitHub Releases for `marchat-plugins`. |
| 15 | + - Copy the final download URL of the uploaded archive. |
| 16 | + |
| 17 | +3. Capture the SHA-256 checksum |
| 18 | + - Use the contents of the generated `.sha256` file (the hex digest). |
| 19 | + |
| 20 | +4. Update `registry.json` |
| 21 | + - Keep one entry per plugin. Point `download_url` and `checksum` to the specific platform you are publishing. |
| 22 | + - Update `version` and `last_updated` accordingly. |
| 23 | + |
| 24 | +### Example `registry.json` entry |
| 25 | +```json |
| 26 | +{ |
| 27 | + "version": "1.0.0", |
| 28 | + "last_updated": "2025-01-01T00:00:00Z", |
| 29 | + "plugins": [ |
| 30 | + { |
| 31 | + "name": "echo", |
| 32 | + "version": "1.0.0", |
| 33 | + "description": "Simple echo plugin for testing the plugin system", |
| 34 | + "author": "Cod-e-Codes", |
| 35 | + "homepage": "https://github.com/Cod-e-Codes/marchat", |
| 36 | + "download_url": "https://github.com/Cod-e-Codes/marchat-plugins/releases/download/v1.0.0/echo-plugin-v1.0.0-windows-amd64.zip", |
| 37 | + "checksum": "sha256:<hex-digest>", |
| 38 | + "category": "utility", |
| 39 | + "tags": ["chat", "utility", "echo", "test"], |
| 40 | + "min_version": "0.2.0-beta.1" |
| 41 | + } |
| 42 | + ] |
| 43 | +} |
| 44 | +``` |
| 45 | + |
| 46 | +Notes: |
| 47 | +- The host validates `GOOS/GOARCH` at runtime and will refuse to launch mismatched binaries with a clear error. |
| 48 | +- If you need to support multiple platforms, publish separate releases and update `registry.json` to point at the one most relevant for your audience. The store and `:plugin list` remain unchanged. |
0 commit comments