Skip to content

ci: Publish vsix to package registry and make release

Zhaochen Li requested to merge zl/1251 into main

Issue - [VS Code] Publish vsix file as part of release ... (#1251 - closed)

Description

When we create a new tag of this project, we publish the assets to VS Code Marketplace and Open VSX Marketplace. As we are looking to integrate GitLab Workflow into Remote Development workspace, we want to be able to download the .vsix file and package it directly with our fork of VS Code. Right now, we would have to download it from VS Code Marketplace or Open VSX Marketplace. We plan to install/sideload the GitLab Workflow extension in the workspace even for those customers/users who will not connect to any third-part marketplace. Thus downloading it from a third-party marketplace during build time feels odd(not sure if there are some implicit usage terms we would be agreeing to on behalf of the customers?)

Implementation Details:

We could like to make gitlab release when a new tag is created for this repo, and include the dist-desktop into the assest.

In order to do this, we first need to publish the built vsix into the gitlab package registry, so later on we could include them as an assest into the release. I think other registry would work either, but think gitlab package registry should be a good option.

Also we have a new job for generating the changelog via the API, and include it into the desctiption.

  • modified npm script version, now it will not only insert into CHANGELOG.md, but also regenerate RELEASE_NOTES.md for later use
  • make_package will save the package_name into dotenv for later job reference
  • new job upload_package, will upload the vsix file from make_package into our gitlab package registry
  • new make_release job will create the new release when new tag is created, use the changelog generated above, and also include the asset for dist-desktop with the link to the package registry

The current CI flow would be like below:

  • make_package will build the vsix file for later use
  • upload_package will grab the above vsix file, and upload to package registry
  • make_release will use the generated changelog, and also include the link from package registry as an assest

Related Issues

Resolves #[issue_number]

How has this been tested?

Screenshots (if appropriate)

We could see in this folk repo, i added in the changes identical to this MR and merge it into main, https://gitlab.com/zhaochen_li/gitlab-vscode-extension-1/-/commits/main/?ref_type=HEADS

Then I mimic the flow for us to create a new release,

What CHANGELOG entry will this MR create?

  • fix: Bug fix fixes - a user-facing issue in production - included in changelog
  • feature: New feature - a user-facing change which adds functionality - included in changelog
  • BREAKING CHANGE: (fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog
  • None - other non-user-facing changes
Edited by Tomas Vik

Merge request reports