Skip to content

Add Helm plugin distribution - #9

Open
Miosp wants to merge 5 commits into
masterfrom
helm-plugin
Open

Add Helm plugin distribution#9
Miosp wants to merge 5 commits into
masterfrom
helm-plugin

Conversation

@Miosp

@Miosp Miosp commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Adds Helm plugin distribution so users can helm plugin install and run helm scribe, with GPG-signed releases for clean Helm v4 verification and native Windows support.

What's new

  • plugin.yaml exposes the plugin as helm scribe, using platformCommand/platformHooks for per-OS commands and install hooks.
  • .goreleaser.yml: embeds the plugin files (plugin.yaml, both hooks) into every archive so verified tarball installs are self-contained, and emits checksums.txt.
  • Release workflow: stamps plugin.yaml's version from the tag, and (gated on a repo variable) imports the signing key, signs, and uploads .prov files.

Miosp added 5 commits July 16, 2026 18:47
Ship helm-scribe as a Helm plugin (helm scribe). Adds plugin.yaml and an
install-binary.sh hook that downloads the matching prebuilt binary per
OS/arch from GitHub Releases. GoReleaser now embeds the plugin files into
each archive so verified tarball installs work on Helm v4, and emits a
checksums.txt that the install hook verifies.

sign-plugin.sh creates Helm provenance (.prov) files per archive and GPG
clear-signs them; the release workflow runs it and uploads the .prov files
when the HELM_SCRIBE_SIGNING_ENABLED repo variable is set. A one-time
scripts/setup-signing-key.sh generates the dedicated signing key, exports
the public signing-key.asc, and prints the secret material to add to GitHub.

Documented both install paths (git URL with --verify=false, and verified
release tarball) in the README.
install-binary.sh now resolves the latest release tag itself via GitHub's
releases/latest redirect, so it no longer reads plugin.yaml's version field.
Both install and update pull the newest release, which removes the need to
manually bump plugin.yaml per release. The Release workflow stamps
plugin.yaml's version from the git tag before GoReleaser packs it, so archive
installs show the correct version in 'helm plugin list'. plugin.yaml's
committed version is now a placeholder.

Also smooths scripts/setup-signing-key.sh: writes the private armor to a
gitignored file for easy clipboard copy, and prints clear GitHub secret/variable
instructions.
install-binary.sh and sign-plugin.sh were at the repo root only because
that mirrors helm-schema's layout. helm itself only requires plugin.yaml at
the root; hook scripts can live anywhere. This repo keeps all helpers under
scripts/, so move them there for consistency and update plugin.yaml, the
GoReleaser files list, and the release workflow. Also drop sign-plugin.sh
from the published archives since it is a CI-time script users never run.
Helm execs plugin commands and hooks directly with no shell, so the previous
manifest (a bare command with no .exe and a .sh install hook) could not install
or run on Windows. Switch plugin.yaml to platformCommand/platformHooks with
per-OS entries: linux/darwin keep the .sh hook and the extensionless binary,
windows points the command at helm-scribe.exe and runs a new
scripts/install-binary.ps1 install hook.

install-binary.ps1 mirrors install-binary.sh: it resolves the latest release
tag via GitHub's releases/latest redirect, downloads the matching windows zip,
verifies it against checksums.txt when available, and extracts helm-scribe.exe
into the plugin bin dir. It targets Windows PowerShell 5.1 (shipped with
Windows) so it works without PowerShell 7.

platformCommand/platformHooks require Helm 3.18+; the plugin therefore needs
Helm 3.18 or 4 on all platforms. GoReleaser now packs install-binary.ps1 into
every archive so verified tarball installs are self-contained on Windows.
@Miosp Miosp self-assigned this Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant