Plugin: condition-circleci
Confirms the current release is running inside CircleCI. Use it to ensure releases are only published from CircleCI pipelines.
Installation
Section titled “Installation”Binary
Section titled “Binary”semrel plugin install @semrel/condition-circlecisemrel 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/condition-circleci:latestVerify the image signature with cosign:
cosign verify ghcr.io/semrels/condition-circleci:latest \ --certificate-identity-regexp 'https://github.com/SemRels/condition-circleci/.github/workflows/release.yml.*' \ --certificate-oidc-issuer https://token.actions.githubusercontent.comConfiguration
Section titled “Configuration”version: 1plugins: - uses: @semrel/condition-circleci phase: condition args: branch: mainEnvironment Variables
Section titled “Environment Variables”| Name | Required | Default | Description |
|---|---|---|---|
SEMREL_PLUGIN_BRANCH | no | — | Optional branch name override. When set, requires CIRCLE_BRANCH to match this value. |
Release Context Variables
Section titled “Release Context Variables”This plugin does not consume any shared SEMREL_* release context variables directly.
Behavior
Section titled “Behavior”The plugin checks the CI environment and succeeds when CIRCLECI=true. If SEMREL_PLUGIN_BRANCH is set, it also requires CIRCLE_BRANCH to match. Outside CircleCI it exits non-zero to stop the release pipeline.