Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 3.56 KB

CONTRIBUTING.md

File metadata and controls

37 lines (26 loc) · 3.56 KB

Contributing

Publishing

Build and Publish Script

The build-and-publish.js script is used for both private preview and public release publishing. It runs the tfx-cli dependency, which is the official Node.js CLI for Azure DevOps. Source code and documentation for this can be found here microsoft/tfs-cli (yes, the names do not match 🤷‍♂️). The tfx-cli will fail if the version number in vss-extension.json has not been changed.

The script requires an environment variable AZURE_TOKEN. This variable must be an Azure DevOps Personal Access Token with the Marketplace: Publish permission. The environment variable is passed to the script as a GitHub Actions encrypted secret.

The current AZURE_TOKEN secret was generated by Vercel's IT department in August 2024 and will expire in August 2025. If the token expires, a new token must be generated and the secret updated in the GitHub repository.

Private Preview

The extension is automatically built and released as a private preview by the Publish Preview CI workflow. The workflow first replaces some values in the vss-extension.json file to make the extension private, and the task json files to make the tasks private and unique. It then builds and publishes the extension to the Visual Studio Marketplace using the build-and-publish script.

Public Release

For public releases, there is a CI workflow that must be manually triggered called Publish Release. This workflow publishes the extension with all of the existing values in the extension and task json files, using the build-and-publish script.

To create a new release:

  • Either within the feature/fix PR, or afterwards, update the task versions in the respective task.json file(s).
    • The versions follow SemVer.
      • Increment Patch for Fixes.
      • Increment Minor for Features.
      • Increment Major for Breaking Changes.
        • Before merging Major changes, consult with the Vercel CLI team to ensure proper documentation and update paths exist.
      • If you are unsure how to version the changes, consult with the Vercel CLI team.
  • After updating the version(s) for the modified task(s), update the extension version within vss-extension.json
    • This also follows SemVer, but how it is updated is based on the task.json version changes.
      • The extension version is incremented based on the greatest version change within the task.json changes.
      • As an example, if one task receives a Patch update, and the other receives a Minor update, then the extension version should increment its Minor version (and subsequently reset the Patch value to 0).
      • If you are unsure, consult with the Vercel CLI team before pushing version changes.
  • After modifying the version values, create and push a commit, and open a PR against main.
  • Once merged to main, the CI will automatically publish a private preview version of the extension to the Visual Studio Marketplace.
  • After testing the preview version, manually run the Publish Release workflow to publish the extension to the public marketplace.