发布新版本

根据您推送的发布类型(主要、次要或补丁),步骤稍有不同

要发布新的修补程序版本(例如 从 0.28.1 到 0.28.2)

  • 将所有需要的修改Cherry-pick到 -stable分支(例如,0.28-stable
  • 确保切换到本地的-stable分支上
  • 运行 npm version patch 递增版本号并创建 Git Commit和Tag
  • 运行 git push origin 0.xx-stable —follow-tags (将 0.xx-stable 换为正确的分支名称)

To release a new minor or major version (eg. from 0.28.x to 0.29.0)

  • 确保当前 master 分支在 Circle, TravisAppVeyor 上是绿色的。
  • 确保位于 master 分支上, 且本地 Yarn 是最新版本。
  • 运行 ./scripts/release-branch.sh。这将:
    • 创建 0. xx-stable 分支和 0. 0 标签
    • Bump master to the next minor version (eg. after releasing 0.29.0, master will be bumped to 0.30.0)
    • 将其全部推送到 origin

将 RC 版本设置为稳定版

Once an RC has been tested by the community for a while and all major bugs have been ironed out, it can be marked as stable. To do this, go to https://release.yarnpkg.com/ and click the “Promote RC to stable” button.

注意: 有一个能够访问该页面的白名单用户列表。 If a maintainer is missing from the whitelist, you can modify it here.

调试发布版本

有时会出错,这里是一些常见问题的调试方法:

我已经提交了标签,但站点依然指向旧版本

检查任何缺失制品的 GitHub 发布版本。 The release scripts do not bump the version number on the site until both the Linux and the Windows artifacts have been attached to the release.

缺少 Linux 制品(.tar.gz、.deb 等)

如果它已经失败,检查 CircleCI build 并重新运行它。 如果构建成功,则检查 webhook 日志 中的任何错误信息。

缺失 Windows 制品(.msi)

Check the AppVeyor build and re-run it if it has failed. If the build succeeded, check the webhook logs for any errors.

所有制品都关联到发布了,但站点依然指向旧版本

检查 yarn-version 的 Jenkins 构建任务 , 看看它是否失败。


如何手动执行

Most of the release has been automated and is fairly straightforward. 通常来说,您只需阅读到这里。 However, if the release tooling ever breaks (or if you like doing things the hard way), you can manually perform the release steps.

创建新发布

  • 运行 yarn build-dist && yarn build-deb 生成发布包、Debian 软件包和 RPM 包
  • 在 Windows 上运行 yarn build-dist && yarn build-win-installer 来构建 Windows 安装程序
  • GPG 签名 .tar.gz.js 制品 sh gpg -u 9D41F3C3 –armor –detach-sign yarn-0.xx.xx.tar.gz 这将生成

.asc files that you should also attach to the release

  • Authenticode sign the .msi 制品 sh osslsigncode sign -t http://timestamp.digicert.com -n “Yarn Installer” -i https://yarnpkg.com/ -pkcs12 yarn-20161122.pfx -readpass yarn-20161122.key -h sha1 -in yarn-0.xx.xx-unsigned.msi -out yarn-0.xx.xx.msi osslsigncode sign -t http://timestamp.digicert.com -n “Yarn Installer” -i https://yarnpkg.com/ -pkcs12 yarn-20161122.pfx -readpass yarn-20161122.key -nest -h sha2 -in yarn-0.xx.xx.msi -out yarn-0.xx.xx.msi

  • Create new release on GitHub, and attach all artifacts. For the MSI, ensure you attach the signed version!

  • Publish the tarball to npm: npm publish ./artifacts/yarn-v0.xx.xx.tar.gz
  • 执行下面的 post-release 步骤

RC 转入稳定版

  • 修改 GitHub 发布,将其标为稳定版
  • 运行 npm dist-tag add yarn@0.xx.xx latest (其中 0.xx.xx 是要发布的版本号)
  • 运行下面的 post-release 步骤

Post-release

  • Bump version number in _config.yml on the website
  • Run ./scripts/build-chocolatey.ps1 to push to Chocolatey
  • Run ./scripts/update-homebrew.sh to push to Homebrew
  • Debian 和 CentOS 仓库应该在5分钟内自动更新到最新版本(盯住那些提交

原文: https://yarnpkg.com/zh-Hans/org/release-process