Plugin: provider-github
Publishes releases to GitHub using the generated SemRel tag, version, and changelog. It supports draft and prerelease flags and can upload matching assets from the local workspace.
Installation
Section titled “Installation”Binary
Section titled “Binary”semrel plugin install @semrel/provider-githubsemrel plugin install downloads the binary to .semrel/plugins/ and updates .semrel.lock. Commit .semrel.lock to pin the version for your team.
Docker
Section titled “Docker”Pre-built, signed multi-platform images (linux/amd64, linux/arm64) are published on every release:
docker pull ghcr.io/semrels/provider-github:latestVerify the image signature with cosign:
cosign verify ghcr.io/semrels/provider-github:latest \ --certificate-identity-regexp 'https://github.com/SemRels/provider-github/.github/workflows/release.yml.*' \ --certificate-oidc-issuer https://token.actions.githubusercontent.comConfiguration
Section titled “Configuration”version: 1plugins: - uses: @semrel/provider-github args: # token is read from SEMREL_PLUGIN_TOKEN or GITHUB_TOKEN env var owner: SemRels repo: semrel draft: false prerelease: false assets: 'dist/*.tar.gz,dist/*.zip' comment_on_prs: "true"Environment Variables
Section titled “Environment Variables”| Name | Required | Default | Description |
|---|---|---|---|
SEMREL_PLUGIN_TOKEN | yes | GITHUB_TOKEN | GitHub token used to create the release (falls back to GITHUB_TOKEN). |
SEMREL_PLUGIN_OWNER | no | current repository owner | Repository owner or organization. |
SEMREL_PLUGIN_REPO | no | current repository name | Repository name to publish into. |
SEMREL_PLUGIN_BASE_URL | no | https://api.github.com | GitHub API base URL override (supports GHES /api/v3 and *.ghe.com; falls back to SEMREL_PLUGIN_API_URL and GITHUB_API_URL). |
SEMREL_PLUGIN_API_URL | no | https://api.github.com | Alias for SEMREL_PLUGIN_BASE_URL. |
SEMREL_PLUGIN_CA_CERT | no | — | Path to a PEM-encoded custom CA certificate bundle for internal/self-signed GHES instances. |
SEMREL_PLUGIN_INSECURE_SKIP_VERIFY | no | false | Skip TLS certificate verification (true/1). Use only as a last resort. |
SEMREL_PLUGIN_DRAFT | no | false | Create the release as a draft. |
SEMREL_PLUGIN_PRERELEASE | no | false | Mark the release as a prerelease. |
SEMREL_PLUGIN_ASSETS | no | — | Comma-separated file paths or glob patterns for release assets to upload. |
SEMREL_PLUGIN_COMMENT_ON_PRS | no | true | Automatically post an idempotent release comment on merged pull requests included in the release (SEMREL_COMMIT_HASHES). |
Release Context Variables
Section titled “Release Context Variables”SEMREL_VERSIONSEMREL_TAG_NAMESEMREL_NEXT_VERSIONSEMREL_CURRENT_VERSIONSEMREL_CHANGELOGSEMREL_COMMIT_HASHESSEMREL_DRY_RUN
Behavior
Section titled “Behavior”For v1.4.0, the provider creates a GitHub release, attaches files matching SEMREL_PLUGIN_ASSETS, publishes the SemRel changelog as release notes, and comments on merged pull requests included in the release with a link to the new release. Works out of the box with GitHub Enterprise Server (GHES) and Data Residency (*.ghe.com).