Organization-wide community health files (CONTRIBUTING.md, the pull request
template), the organization profile (profile/README.md), and reusable
workflows shared by Silo-Server repositories.
Builds, signs, and publishes a Silo-Server plugin release. Each plugin
repository's .github/workflows/release.yml calls it on a tag push:
name: Release
on:
push:
tags: ['v*']
permissions: {}
jobs:
release:
permissions:
contents: write
id-token: write
attestations: write
uses: Silo-Server/.github/.github/workflows/plugin-release.yml@main
secrets:
dispatch_token: ${{ secrets.SILO_PLUGINS_DISPATCH_TOKEN }}Reference it only at @main. The signing certificate's subject
(job_workflow_ref) records the ref the caller used, and Silo servers accept
only
https://github.com/Silo-Server/.github/.github/workflows/plugin-release.yml@refs/heads/main.
That identity proves only that the workflow file ran from whatever this
repository's main branch held at the time. A SHA or tag reference could point
at any commit, including one pushed to a fork, so a release called at any other
ref fails the workflow's own verification step and is not published.
The identity is only as trustworthy as this repository's main: anyone who
can push to main can change what every plugin release runs and signs. The
guarantee depends on protecting main (required review, no direct or force
pushes) and on a tag ruleset that blocks creating a tag named main, since a
tag takes precedence over a branch of the same name in uses:.
Contract:
- Trigger: a
pushof a tagvMAJOR.MINOR.PATCH(optionally-PRERELEASE). The tagged commit must be on the first-parent history of the plugin repository'smain, itsmanifest.jsonversionmust equal the tag without thev, and that version must be strictly greater, by semver precedence (1.2.0-rc.1<1.2.0), than its first parent's (a root commit or a parent withoutmanifest.jsonpasses). No later first-parent commit onmainmay set a lower version; a reverted bump is not releasable. Only one commit per version is releasable. To release, merge a pull request that bumpsmanifest.json, then tag the commit onmainthat bumped it: the squash commit, or the merge commit for a merge-commit PR. - Prereleases (
vX.Y.Z-rc.1) publish a GitHub prerelease and do not notify the catalog. - Permissions: the calling job grants
contents: write,id-token: write, andattestations: write. The workflow narrows them per job; only the signing job, which runs no plugin code and downloads nothing, can request a signing token. - Input
platforms(optional): comma-separatedGOOS/GOARCHpairs. Defaultlinux/amd64,linux/arm64,darwin/arm64,freebsd/amd64,freebsd/arm64. A plugin that cannot build for one of these sets its own list, which should matchsupported_platformsin itsmanifest.json. - Input
catalog_repository(optional): the catalog to notify,Silo-Server/silo-plugins(the default) orSilo-Community/silo-plugins. Any other value fails the run before anything is built. An approved community plugin passescatalog_repository: Silo-Community/silo-pluginsunderwith:. - Secret
dispatch_token(optional): when set, a non-prerelease sends aplugin_release_publishedrepository_dispatchto the catalog repository with{"repo": "<owner>/<name>", "tag": "<tag>"}. When unset, it skips the dispatch. The dispatch is its own job after the release, so a failed dispatch can be re-run alone. - Build: one job builds every platform from the main package at the
repository root, with Go from
go.mod,CGO_ENABLED=0 go build -trimpath -ldflags="-s -w -X main.version=<version>", cross-compiled on Ubuntu. Asilo-plugin-sdkreplace, or a replace to an absolute or../path, ingo.modfails the build. - Integrity between jobs: the build job returns the binaries'
sha256sumlines as a job output, and the signing job attests exactly those digests. The release job publishes the downloaded binaries only aftersha256sum --checkagainst that output andgh attestation verifyagainst the bundle, so a replaced artifact fails before anything is published. - Release assets:
plugin-<os>-<arch>for each platform,checksums.txt(sha256sumformat, one line per binary), andplugin.sigstore.json, a single Sigstore bundle from GitHub artifact attestations that lists every binary as a subject.
The signing certificate carries Source Repository URI = the plugin repository
and Source Repository Ref = refs/tags/vX.Y.Z. Verify a binary with:
gh attestation verify plugin-linux-amd64 \
--bundle plugin.sigstore.json \
--repo Silo-Server/<plugin-repo> \
--cert-identity https://github.com/Silo-Server/.github/.github/workflows/plugin-release.yml@refs/heads/main \
--source-ref refs/tags/vX.Y.Z \
--deny-self-hosted-runnersChanging the inputs, assets, or certificate identity breaks every plugin repository and the servers that verify their releases. Coordinate such changes across those repositories first.