Release Process
To release a new version of Yarn
- Make sure current master branch is green on Circle, Travis and AppVeyor
- Ensure your local copy of Yarn is up-to-date, then run
./scripts/release-branch.sh
. This will create the0.xx-stable
branch and assign tag0.xx.0
to HEAD and push it all to gitorigin
- CircleCI and Appveyor will automatically create a GitHub release if the build is passing. They will build the artifacts and attach them to the Github release. And also they will publish the new version to npm with tag
rc
(meaning that it won’t be installed for users by default but will be available) - Verify that all artifacts are attached to release (
.tar.gz
,.deb
,.rpm
and.msi
). Do not continue until this is checked - Generate new release notes with command
git-release-notes v0.yy.0..v0.xx.0 markdown > release-notes.md
using git release notes tool where v.0.yy.0 is the last stable tag Suggestions for alternative tools are welcome
To patch existing version of Yarn
- Switch to released branch
git checkout 0.x-stable
, e.g 0.7-stable - Cherry-pick fixes from master branch
- Tag the new release
npm version patch
, it will create a commit with changed package.json and tagv0.xx.1
to that commit - Push to origin
git push origin 0.x-stable --follow-tags
To mark a release as stable
- Remove tag
rc
from the release on npm and set the version considered as stable tolatest
:npm dist-tag rm yarn rc npm dist-tag add yarn@<version> latest
- Bump
latest_version
in _config.yml on the website. This updates the download URLs (/latest.tar.gz
etc) to point to the new release. This will eventually be automated (#187) - Debian and CentOS repo should be automatically updated with the latest release within 5 minutes (keep an eye on the commits)
Old Manual Process
This is the old way releases were done, for reference (in case any of the automation breaks). Building a release was a two-step process - Most stuff is built on Linux, and some Windows-specific stuff (such as the Windows installer) is built on Windows.
On Linux:
./scripts/release-branch.sh
- Build Debian and RPM packages:
./scripts/build-deb.sh
- Attach
.deb
and.rpm
files fromartifacts
directory to the Github release
On Windows:
- Build Yarn like normal (
yarn install && yarn run build
) powershell .\scripts\build-dist.ps1
- Build Windows installer:
yarn run build-win-installer
- TODO: Add Authenticode signing for installer (#619)
- Build Chocolatey package:
yarn run build-chocolatey
- Attach resulting
.msi
file fromartifacts
directory to Github release - Upload Chocolatey package (in the future we should automate this).
- Note: Only do this once the MSI is attached to the Github release, as Chocolatey pulls the MSI via the download link
- Also note: Modifying the MSI after uploading the Chocolatey package will break the Chocolatey package, as it contains a hash of the MSI. Make sure to always update both at the same time!