6.2 KiB
Releasing (write access required)
-
Double-check the
CHANGELOG.mdcontains all desired change comments and has the version to be released with date at the top.- Go through all recent PRs and make sure they are properly accounted for.
- Make sure all changelog entries have links back to their PR(s) if appropriate.
- For picking the new version number, we default to increasing the patch version number, but make our own judgement about whether a change is big enough to warrant a minor version bump. Common reasons for a minor bump could include:
- Making substantial new features available to all users. This can include lifting a feature flag.
- Breakage in compatibility with recent versions of the CLI.
- Minimum required version of VS Code is increased.
- New telemetry events are added.
- Deprecation or removal of commands.
- Accumulation of many changes, none of which are individually big enough to warrant a minor bump, but which together are. This does not include changes which are purely internal to the extension, such as refactoring, or which are only available behind a feature flag.
-
Double-check that the node version we're using matches the one used for VS Code. If it doesn't, you will then need to update the node version in the following files:
.nvmrc- this will enablenvmto automatically switch to the correct node version when you're in the project folder.github/workflows/main.yml- all the "node-version: '[VERSION]'" settings.github/workflows/release.yml- the "node-version: '[VERSION]'" setting
-
Double-check that the extension
package.jsonandpackage-lock.jsonhave the version you intend to release. If you are doing a patch release (as opposed to minor or major version) this should already be correct. -
Create a PR for this release:
- This PR will contain any missing bits from steps 1, 2 and 3. Most of the time, this will just be updating
CHANGELOG.mdwith today's date. - Create a new branch for the release named after the new version. For example:
v1.3.6 - Create a new commit with a message the same as the branch name.
- Create a PR for this branch.
- Wait for the PR to be merged into
main
- This PR will contain any missing bits from steps 1, 2 and 3. Most of the time, this will just be updating
-
Switch to
mainbranch and pull latest changes -
Lock the
mainbranch.- Go to the branch protection rules for the
mainbranch - Select "Lock branch"
- Click "Save changes"
- Go to the branch protection rules for the
-
Ensure that no PRs have been merged since the release PR that you merged. If there were, you might need to unlock
maintemporarily and update the CHANGELOG again. -
Build the extension
npm run buildand install it on your VS Code using "Install from VSIX". -
Go through our test plan to ensure that the extension is working as expected.
-
Switch to
mainand add a new tag on themainbranch with your new version (named after the release), e.g.git checkout main git tag v1.3.6If you've accidentally created a badly named tag, you can delete it via
git tag -d badly-named-tag -
Unlock the main branch
- Go to the branch protection rules for the
mainbranch - Deselect "Lock branch"
- Click "Save changes"
- Go to the branch protection rules for the
-
Push the new tag up:
a. If you're using a fork of the repo:
git push upstream refs/tags/v1.3.6b. If you're working straight in this repo:
git push origin refs/tags/v1.3.6This will trigger a release build on Actions.
- IMPORTANT Make sure you are on the
mainbranch and your local checkout is fully updated when you add the tag. - If you accidentally add the tag to the wrong ref, you can just force push it to the right one later.
- IMPORTANT Make sure you are on the
-
Monitor the status of the release build in the
Releaseworkflow in the Actions tab.- DO NOT approve the "publish" stages of the workflow yet.
-
Download the VSIX from the draft GitHub release at the top of the releases page that is created when the release build finishes.
-
Unzip the
.vsixand inspect itspackage.jsonto make sure the version is what you expect, or look at the source if there's any doubt the right code is being shipped. -
Install the
.vsixfile into your vscode IDE and ensure the extension can load properly. Run a single command (like run query, or add database). -
Go to the actions tab of the vscode-codeql repository and select the Release workflow.
- If there is an authentication failure when publishing, be sure to check that the authentication keys haven't expired. See below.
-
Approve the deployments of the correct Release workflow. This will automatically publish to Open VSX and VS Code Marketplace.
-
Go to the draft GitHub release in the releases tab of the repository, click 'Edit', add some summary description, and publish it.
-
Confirm the new release is marked as the latest release at https://github.com/github/vscode-codeql/releases.
-
If documentation changes need to be published, notify documentation team that release has been made.
-
Review and merge the version bump PR that is automatically created by Actions.
Secrets and authentication for publishing
Repository administrators, will need to manage the authentication keys for publishing to the VS Code marketplace and Open VSX. Each requires an authentication token. The VS Code marketplace token expires yearly.
To regenerate the Open VSX token:
- Log in to the user settings page on Open VSX.
- Make sure you are a member of the GitHub namespace.
- Go to the Access Tokens page and generate a new token.
- Update the secret in the
publish-open-vsxenvironment in the project settings.
To regenerate the VSCode Marketplace token, please see our internal documentation. Note that Azure DevOps PATs expire every 90 days and must be regenerated.