semantic-release "not triggered in a known CI environment" in CI
semantic-release uses environment detection to confirm it is running in CI before it publishes. When it cannot detect a known CI environment, it assumes a local run and switches to dry-run mode, so no release is created.
What this error means
The log says "This run was not triggered in a known CI environment, running in dry-run mode" and semantic-release computes but does not publish a version.
[semantic-release] This run was not triggered in a known CI environment, running in dry-run mode.
[semantic-release] Release note for version 1.4.0 (dry-run)Common causes
The CI environment variable is not set
semantic-release checks variables like CI; a custom or containerized runner that does not set them looks like a local machine.
Running inside a nested tool that strips CI vars
A wrapper (act, a container step) does not propagate the CI environment variables, so detection fails.
How to fix it
Set the CI variable for the step
- Export
CI=truefor the semantic-release step on non-standard runners. - On GitHub-hosted runners CI is already set; check custom images.
- Re-run so semantic-release detects CI and publishes.
- run: npx semantic-release
env:
CI: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}Only bypass detection deliberately
If you truly need to force a real run outside CI, pass --no-ci, but prefer setting the environment correctly instead.
npx semantic-release --no-ciHow to prevent it
- Ensure custom runner images set the CI environment variable.
- Propagate CI variables through container and wrapper steps.
- Reserve --no-ci for intentional manual releases only.