Skip to content

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 variableModuleDescription
GITHUB_TOKENgithub / pr / --sync-releases / changelogGitHub 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_ACTIONSgithubPresent automatically in GitHub Actions; when set, GitHub authentication and collaborator permission checks are skipped
GITHUB_ACTORgithubUsed as username in the context in GitHub Actions environments
GITHUB_SERVER_URLgithubPresent 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_TOKENgitlab / pr / --sync-releasesGitLab 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_TOKENgitlabThe 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_URLgitlabPresent 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_FILEgitlabPath 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_TOKENnpmPublishing 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 variableDescription
HTTP_PROXY / http_proxyProxy address for HTTP requests
HTTPS_PROXY / https_proxyProxy address for HTTPS requests
NO_PROXY / no_proxyList of host names or network ranges that bypass the proxy

github.proxy can 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 variableDescription
NEOS_RELEASE_LANGOverrides 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 / LANGSystem 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_OFFLINEWhen set to 1, true or yes, disables non-essential network requests such as resolving contributor GitHub usernames

CI Detection and Debugging ​

Environment variableDescription
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_DEBUGSet 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_ENVWhen set to development, a failed release prints the full error stack
DEBUGWhen 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 variableDescription
RELEASE_VERSION / RELEASE_LATEST_VERSIONVersion of this release / latest version before the release
RELEASE_TAG_NAME / RELEASE_LATEST_TAG / RELEASE_SECOND_LATEST_TAGTag name of this release / tag name of the previous release / second-to-last tag name
RELEASE_NAME / RELEASE_NPM_NAME / RELEASE_NPM_TAGProject name / package name from package.json / dist-tag used when publishing to npm
RELEASE_BRANCH_NAME / RELEASE_REMOTE_URLCurrent branch name / Git remote URL
RELEASE_REPO_PROTOCOL / RELEASE_REPO_HOST / RELEASE_REPO_OWNER / RELEASE_REPO_PROJECT / RELEASE_REPO_REPOSITORY / RELEASE_REPO_REMOTERemote protocol / host name / owner / project name / owner/project / normalized remote URL
RELEASE_CHANGELOGBody of the changelog generated for this release (multi-line)
RELEASE_IS_PRE_RELEASE / RELEASE_PRE_RELEASE_IDWhether it is a pre-release / pre-release identifier
RELEASE_IS_RELEASED / RELEASE_RELEASE_URL / RELEASE_DISCUSSION_URLWhether a GitHub / GitLab Release has been created / Release link / link to the attached Discussion
RELEASE_PR_BRANCH / RELEASE_BASE_BRANCH / RELEASE_ORIGINAL_BRANCHRelease 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_METHODPR / 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|alacritty or TERMINAL_EMULATOR=JetBrains-JediTerm is detected.