Yarn Build and Release Tasks
August 21, 2026 · View on GitHub
![]()
Yarn Build and Release Tasks
⚠️ Deprecated and unmaintained
This extension is no longer maintained. No further releases, bug fixes or security updates will be published, and Yarn 1.x (Classic) is itself end-of-life.
You almost certainly don't need it — see Migrating off this extension below. The repository is left as-is for anyone who still depends on it. Feel free to fork.
Migrating off this extension
Yarn 1.x is already available in the standard hosted agent images, and Yarn 2 and later can be enabled directly through Corepack. Between the two, none of this needs an extension any more.
The following does everything this extension did, with nothing installed:
variables:
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn-cache
steps:
- task: NodeTool@0
inputs:
versionSpec: "20.x"
- task: Bash@3
displayName: Yarn enable
inputs:
targetType: "inline"
script: |
corepack enable
corepack prepare yarn@stable --activate
- task: Cache@2
displayName: Cache Yarn packages
inputs:
key: '"yarn" | "$(Agent.OS)" | yarn.lock'
restoreKeys: |
yarn | "$(Agent.OS)"
yarn
path: $(YARN_CACHE_FOLDER)
- task: Bash@3
displayName: Yarn
inputs:
targetType: "inline"
script: |
yarn --immutable
- task: Bash@3
displayName: Yarn build
inputs:
targetType: "inline"
script: |
yarn build
If your project pins its Yarn version with the packageManager field in package.json, then
corepack enable on its own is enough and the corepack prepare line can be dropped. On Yarn
1.x, use yarn --frozen-lockfile in place of yarn --immutable.
If package feed authentication is needed — the one thing the Yarn task did beyond running Yarn — the built-in npm authenticate task does the job.
Yarn is Facebook's npm alternative. It is the fast, reliable and secure dependency management. This extension brings the power of Yarn to Visual Studio Team Services Build and Release Management. It enables using yarn with the official npm registry or any registry you like such as Myget or Visual Studio Team Services Package Management.

Why so much sudden love for Yarn ? You can find out here
Learn more about this extension on the wiki!
Tasks included
- Yarn installer: Installs Yarn
- Yarn: Execute Yarn
To contribute
Requires Node.js 20 or later. typescript and tfx-cli are resolved from the repo's own
dependencies, so no global installs are needed.
- From the root of the repo run
npm install. This will pull down the necessary modules for the different tasks and for the build tools. - Run
npm run buildto compile the build tasks. - Run
npm run package -- --version <version>to create the .vsix extension packages (supports multiple environments) that includes the build tasks.
Known Issues
Please refer to our wiki page
Release Notes
Please refer to our release page
Contributors
This extension was created by Geek Learning, with help from the community. It also uses some foundation code from Azure pipelines Tasks.