Skip to content

Plugin: condition-circleci

Confirms the current release is running inside CircleCI. Use it to ensure releases are only published from CircleCI pipelines.

Terminal window
semrel plugin install @semrel/condition-circleci

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/condition-circleci:latest

Verify the image signature with cosign:

Terminal window
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.com
version: 1
plugins:
- uses: @semrel/condition-circleci
phase: condition
args:
branch: main
NameRequiredDefaultDescription
SEMREL_PLUGIN_BRANCHno—Optional branch name override. When set, requires CIRCLE_BRANCH to match this value.

This plugin does not consume any shared SEMREL_* release context variables directly.

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.