Skip to content

vsce: improve release flow

Warren Gifford requested to merge bee/vsce-publish into main

Created by: abeatrix

Summary

Close https://github.com/sourcegraph/sourcegraph/issues/34940

Currently, if we want to make a release for the VS Code extension, we will create a commit in a certain format and push it to the release branch, where the CI will then read the commit, update the version number and the changelog, and then make the release. However, the changes made to the package.json and the changelog are not included in the build and not committed to both the main and release branches, and required us to update the changes manually which is not optimal for an auto-release process.

New Release Flow

Run the yarn release:major or yarn release:minor or yarn release:patch or yarn release:pre command locally. These commands will:

  1. Update the version number in package.json
  2. Update the version number and format in changelog
  3. Make a commit for the release and push to the current branch
  4. The branch now has everything a release needs --an updated package.json and changelog
  5. Once this branch is pushed to the main branch, we can then push it to the release branch for release to make sure all the files that need to be already are already included in the main branch.

It will no longer read the commit message as at that point we are certain the version number and changelog are taken care of. It will automatically publish the newest version to the marketplace with the correct package name.

Command list

For devs to run locally before a release:

  • yarn release:major
  • yarn release:minor
  • yarn release:patch
  • yarn release:pre

For CI to run to publish the extension:

  • yarn publish

Test plan

Tested manually for the commands

Merge request reports

Loading