Environment Variables Reference
This page lists all environment variables actually read by @neosjs/release and its built-in plugins, as well as the environment variables it passes to commands such as hooks and git.logCommand.
Authentication and Hosting Platforms
| Environment variable | Module | Description |
|---|---|---|
GITHUB_TOKEN | github / pr / --sync-releases / changelog | GitHub Token (a classic Token needs the repo scope; for the permissions a fine-grained Token needs, see GitHub Releases) or an Actions Token. The variable name can be changed with github.tokenRef. When it is not set, the tool falls back automatically to the locally logged-in gh CLI (it runs gh auth token, adding --hostname automatically for GitHub Enterprise); when neither is available, the github plugin falls back to publishing through the browser. It is also used to resolve contributors in the changelog to GitHub usernames (for private repositories, a Token or a logged-in gh CLI is required for resolution). Only sent to github.com, the host specified by github.host, or the GITHUB_SERVER_URL of Actions (see GitHub Releases) |
GITHUB_ACTIONS | github | Present automatically in GitHub Actions; when set, GitHub authentication and collaborator permission checks are skipped |
GITHUB_ACTOR | github | Used as username in the context in GitHub Actions environments |
GITHUB_SERVER_URL | github | Present automatically in GitHub Actions; on Actions of a self-hosted instance, a Token from an environment variable may be sent to the host it declares |
GITLAB_TOKEN | gitlab / pr / --sync-releases | GitLab Personal Access Token (needs the api scope). The variable name can be changed with gitlab.tokenRef. Only sent to gitlab.com, the host specified by gitlab.origin, or the CI_SERVER_URL of GitLab CI (see GitLab Releases) |
CI_JOB_TOKEN | gitlab | The Job Token built into GitLab CI (must be used together with gitlab.tokenRef: "CI_JOB_TOKEN" and gitlab.tokenHeader: "JOB-TOKEN") |
GITLAB_CI / CI_SERVER_URL | gitlab | Present automatically in GitLab CI; in pipelines on a self-hosted instance, a Token from an environment variable may be sent to the host declared by CI_SERVER_URL |
CI_SERVER_TLS_CA_FILE | gitlab | Path to the CA certificate file of a self-hosted GitLab (injected automatically by GitLab Runner). The variable name can be changed with gitlab.certificateAuthorityFileRef, or the file can be specified explicitly with gitlab.certificateAuthorityFile |
NODE_AUTH_TOKEN / NPM_TOKEN | npm | Publishing tokens used by the npm / pnpm CLI together with .npmrc (usually injected in CI pipelines) |
Network Proxy
When github.proxy: true or gitlab.proxy: true is set, the internal EnvHttpProxyAgent based on undici reads the standard proxy environment variables automatically:
| Environment variable | Description |
|---|---|
HTTP_PROXY / http_proxy | Proxy address for HTTP requests |
HTTPS_PROXY / https_proxy | Proxy address for HTTPS requests |
NO_PROXY / no_proxy | List of host names or network ranges that bypass the proxy |
github.proxycan also be set to a specific proxy URL string (such as"http://127.0.0.1:7890"), in which case the environment variables above are not used.
Interface Language and Offline Mode
| Environment variable | Description |
|---|---|
NEOS_RELEASE_LANG | Overrides the interface language (zh-CN / en / auto are supported). It has lower priority than the command-line --lang flag and the lang configuration, and higher priority than the system locale |
LC_ALL / LC_MESSAGES / LANG | System locale settings; when no language is specified explicitly, these are checked in this order (Chinese is used when the value starts with zh, English otherwise. CI images usually use C.UTF-8 / English, so the default output is English) |
NEOS_RELEASE_OFFLINE | When set to 1, true or yes, disables non-essential network requests such as resolving contributor GitHub usernames |
CI Detection and Debugging
| Environment variable | Description |
|---|---|
CI (and the variables of each CI platform) | Detected automatically by ci-info; when truthy, the non-interactive CI mode is enabled by default (force it off with --no-ci) |
NODE_DEBUG | Set to @neosjs/release:* (or a specific module such as @neosjs/release:config, @neosjs/release:shell, @neosjs/release:plugins) to enable low-level debug output |
NODE_ENV | When set to development, a failed release prints the full error stack |
DEBUG | When set to any non-empty value, a failed release prints the full error stack, same as with NODE_ENV=development |
Environment Variables Passed to Commands
hooks, git.logCommand and string-valued releaseNotes are executed through the system shell. Template variables (${version}, ${branchName}, ${changelog}, etc.) are also passed to these commands as environment variables: with a RELEASE_ prefix and snake case naming (${repo.owner} → $RELEASE_REPO_OWNER). A value rendered into a command must not contain shell syntax; read multi-line content such as the changelog with "$RELEASE_CHANGELOG".
| Environment variable | Description |
|---|---|
RELEASE_VERSION / RELEASE_LATEST_VERSION | Version of this release / latest version before the release |
RELEASE_TAG_NAME / RELEASE_LATEST_TAG / RELEASE_SECOND_LATEST_TAG | Tag name of this release / tag name of the previous release / second-to-last tag name |
RELEASE_NAME / RELEASE_NPM_NAME / RELEASE_NPM_TAG | Project name / package name from package.json / dist-tag used when publishing to npm |
RELEASE_BRANCH_NAME / RELEASE_REMOTE_URL | Current branch name / Git remote URL |
RELEASE_REPO_PROTOCOL / RELEASE_REPO_HOST / RELEASE_REPO_OWNER / RELEASE_REPO_PROJECT / RELEASE_REPO_REPOSITORY / RELEASE_REPO_REMOTE | Remote protocol / host name / owner / project name / owner/project / normalized remote URL |
RELEASE_CHANGELOG | Body of the changelog generated for this release (multi-line) |
RELEASE_IS_PRE_RELEASE / RELEASE_PRE_RELEASE_ID | Whether it is a pre-release / pre-release identifier |
RELEASE_IS_RELEASED / RELEASE_RELEASE_URL / RELEASE_DISCUSSION_URL | Whether a GitHub / GitLab Release has been created / Release link / link to the attached Discussion |
RELEASE_PR_BRANCH / RELEASE_BASE_BRANCH / RELEASE_ORIGINAL_BRANCH | Release branch in Release-via-PR mode / target branch to merge into / branch you were on before the release |
RELEASE_PR_URL / RELEASE_PR_ACTION / RELEASE_PR_METHOD | PR / MR link / result (created, updated, web) / how it was created (gh, api, web) |
Only values produced during the release are passed to commands; configuration options are not included (the configuration may contain sensitive values such as npm.otp). A variable that has no value yet at the current stage (for example RELEASE_RELEASE_URL at after:bump) is not set.
Terminal Display Fallback
@neosjs/release uses the following environment variables to decide whether the terminal supports Unicode icons (when it does not, ASCII symbols are used automatically):
- Non-Windows: Unicode is enabled when
TERM !== 'linux'. - Windows: Unicode is enabled when
CI,WT_SESSION,TERMINUS_SUBLIME,ConEmuTask={cmd::Cmder},TERM_PROGRAM=vscode|Terminus-Sublime,TERM=xterm-256color|alacrittyorTERMINAL_EMULATOR=JetBrains-JediTermis detected.