Publishing Plugins
Sign, record and submit a plugin release with hive plugin publish, and test it against any Hive release.
From Hive 1.7, hive plugin publish makes a registry release in one step,
and hive plugin test checks a plugin against any Hive release. The
registry format is in
REGISTRY.md; how
listings are reviewed is in governance.md.
Before the first release
-
A signing key. Releases are signed with an ed25519 SSH key, the default of
ssh-keygen:sh ssh-keygen -t ed25519 -f ~/.ssh/hive-plugin -C "acme plugin releases"Its public half (
~/.ssh/hive-plugin.pub) goes in your publisher record in the registry’sregistry/publishers.json, through the pull request that submits your listing. Official and verified releases must be signed; community plugins may publish unsigned (--unsigned), and Hive then warns whoever installs them. -
A listing. Submit
registry/submissions/<id>.jsonas governance.md describes, with"publisher": "<your publisher id>"in its listing. Releases are added to it bypublish --submit. -
Tests (optional). A
[test]table runs your own checks, withHIVE_BINandHIVE_HOMEpointing at the Hive under test:toml min_hive_version = "1.7.0" # Hive before 1.7 rejects the [test] key[test]command = ["./test.sh"]timeout = "5m" # default 10m, at most 2h
Publishing a release
Bump version in hive-plugin.toml, commit, then:
hive plugin publish --key ~/.ssh/hive-plugin --dry-run # everything but tag, push and submithive plugin publish --key ~/.ssh/hive-plugin --push --out release.jsonpublish:
- checks the manifest, and refuses uncommitted changes or a tag that already points at another commit (releases are immutable: bump the version);
- runs
hive plugin testagainst this Hive (--skip-testsskips it); - tags the commit
v<version>, or<id>/v<version>for a plugin in a subdirectory, so plugins sharing a repository tag apart (--refchooses another tag ending in the version), and pushes it with--push(--git-remote, defaultorigin); - computes the
git archivechecksum the registry pins; - signs the release statement with
ssh-keygen -Y sign.--keyis a private key file, or a public key file whose private half is inssh-agent; without it, git’suser.signingkeyis used (a path, orkey::ssh-ed25519 …); - records how it was built: in GitHub Actions the repository, workflow
and run; anywhere else,
local; - prints the release record (
--json, or--out <file>).
--submit --registry <checkout of the registry repository> appends the
release to your submission and opens the pull request with gh.
From GitHub Actions
on: push: tags-ignore: ['**'] branches: [main] paths: [hive-plugin.toml]jobs: publish: runs-on: ubuntu-latest permissions: contents: write # push the release tag steps: - uses: actions/checkout@v7 with: fetch-depth: 0 - uses: admirable-oss/hive/.github/actions/plugin-publish@v1.7.0 with: signing-key: ${{ secrets.HIVE_PLUGIN_SIGNING_KEY }} # the private key file's contents registry-token: ${{ secrets.HIVE_REGISTRY_TOKEN }} # optional: open the registry PRThe action installs Hive, publishes with the key from the secret (written to a private temporary file and removed afterwards), and records the run as the release’s provenance.
Testing against Hive releases
hive plugin test # this plugin, this Hivehive plugin test --hive 1.7.0-rc.1 # a release, downloaded and checked against its signaturehive plugin test --hive ./bin/hive # a build of your ownhive plugin test pr-status --json # a catalog plugin's newest releaseIt validates, installs (links) and checks the plugin with hive plugin doctor in a scratch HIVE_HOME, runs the [test] command, prints each
check, and exits 1 on a failure.
The registry runs it for every listed plugin against each Hive release
candidate (the plugin-compat workflow). The results appear in the
catalog as each release’s tested, and in hive plugin info. A failing
official plugin blocks the Hive release; a failing community plugin is
recorded and reported on its repository.