Skip to content

Release

Andrew Kushnir edited this page Feb 14, 2024 · 39 revisions

This repository contains two releasable items:

  1. @angular/language-server NPM package
    This is the LSP server integrated into other clients like vim, emacs, Eclipse, etc.
  2. Angular.ng-template vscode extension
    This is published to the Visual Studio Marketplace.

Before the release

Before you do your first release:

  1. Create a fork of this repository if you don't have one yet.
  2. Setup git remotes:
    • upstream to point to this repository
    • origin to point to your fork

Release Steps

  1. Prepare local environment:

    git checkout main
    git pull upstream main
    yarn
    yarn bazel clean
  2. Determine the next version (X.Y.Z) and the appropriate git branch.
    If publishing a patch version, checkout the patch branch, otherwise checkout the main branch.

  3. Set a releaseVersion variable so you can more easily copy-paste commands:

    releaseVersion=X.Y.Z
  4. Update version in package.json to releaseVersion.

  5. Manually update the version of @angular/language-service in package.json and server/package.json to the latest. The version in both files must be the same.

  6. Update the version of the typescript dependency in package.json to match the upstream Angular repository. In order to do this, you may need to update the aspect_rules_ts version in WORKSPACE to the latest one from here. Another option is to specify the version manually and use ts_integrity, directions found here.

  7. Look at the CHANGELOG in @angular/angular for commits related to language service, and copy them to this repo's CHANGELOG.

  8. Append notable commits in this repository, particularly fixes and features, to the CHANGELOG

    git log --pretty=format:'%s (%h)' vX.Y.Z-1..HEAD
  9. Build the NPM package and vscode extension

    ./scripts/build.sh package.json
  10. Do a quick check to make sure everything works as expected.

    • Install the .vsix through either vscode or run
      code --install-extension bazel-bin/npm/ng-template.vsix
    • Open the test project in vscode.
    • Run yarn && yarn build in the integration/project folder.
    • Execute a few operations such as go to definition, hover, check semantics, and auto-complete.
  11. Check out a release branch, commit the changes:

    git checkout -b ${releaseVersion}-release
    git commit -am "release: v${releaseVersion}"
    git push <your remote>

    After that:

    • Create a PR and add the "merge" and "target" labels
    • Get an approval
    • Important: wait for CI to be green
    • Merge the PR into upstream using yarn ng-dev pr merge <PR-ID>
  12. Check out the main, tag the release, and push to upstream

    git checkout main
    git pull upstream main
    git tag v${releaseVersion}
    git push upstream --tags
  13. Make sure you're logged into Angular NPM account. If not, run the following command:

    npm login --registry https://wombat-dressing-room.appspot.com --no-browser
  14. Release @angular/language-server

    npm publish bazel-bin/npm/server --access public
  15. Make sure you're logged into Azure DevOps account. If not, follow the instructions below.

  16. Release vscode extension from the root of the repository.

    yarn vsce publish --packagePath bazel-bin/npm/ng-template.vsix
  17. Update release notes in github.

    • Go to the Releases section
    • Click "Draft new release"
    • Copy the text added to the CHANGELOG.md
    • Upload the .vsix file
    • Click "Publish Release"

Login to Azure DevOps

  1. [optional] Read the overall instructions in vscode's documentation
  2. To obtain the security token, go to go/valentine.
  3. Search for Angular vscode marketplace
  4. Copy the Personal Access Token (PAT)
  5. Run yarn vsce login Angular
  6. Paste the PAT
Clone this wiki locally