Skip to content

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.

Terminal window
semrel plugin install @semrel/provider-github

semrel plugin install downloads the binary to .semrel/plugins/ and updates .semrel.lock. Commit .semrel.lock to pin the version for your team.

Pre-built, signed multi-platform images (linux/amd64, linux/arm64) are published on every release:

Terminal window
docker pull ghcr.io/semrels/provider-github:latest

Verify the image signature with cosign:

Terminal window
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.com
version: 1
plugins:
- 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"
NameRequiredDefaultDescription
SEMREL_PLUGIN_TOKENyesGITHUB_TOKENGitHub token used to create the release (falls back to GITHUB_TOKEN).
SEMREL_PLUGIN_OWNERnocurrent repository ownerRepository owner or organization.
SEMREL_PLUGIN_REPOnocurrent repository nameRepository name to publish into.
SEMREL_PLUGIN_BASE_URLnohttps://api.github.comGitHub 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_URLnohttps://api.github.comAlias for SEMREL_PLUGIN_BASE_URL.
SEMREL_PLUGIN_CA_CERTno—Path to a PEM-encoded custom CA certificate bundle for internal/self-signed GHES instances.
SEMREL_PLUGIN_INSECURE_SKIP_VERIFYnofalseSkip TLS certificate verification (true/1). Use only as a last resort.
SEMREL_PLUGIN_DRAFTnofalseCreate the release as a draft.
SEMREL_PLUGIN_PRERELEASEnofalseMark the release as a prerelease.
SEMREL_PLUGIN_ASSETSno—Comma-separated file paths or glob patterns for release assets to upload.
SEMREL_PLUGIN_COMMENT_ON_PRSnotrueAutomatically post an idempotent release comment on merged pull requests included in the release (SEMREL_COMMIT_HASHES).
  • SEMREL_VERSION
  • SEMREL_TAG_NAME
  • SEMREL_NEXT_VERSION
  • SEMREL_CURRENT_VERSION
  • SEMREL_CHANGELOG
  • SEMREL_COMMIT_HASHES
  • SEMREL_DRY_RUN

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).