Skip to content

Commit 840cfbf

Browse files
committed
Move releasing docs to separate doc file
1 parent 2217d3f commit 840cfbf

File tree

2 files changed

+78
-79
lines changed

2 files changed

+78
-79
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -223,85 +223,6 @@ Once the scenario has been recorded, it's often useful to remove some of the req
223223

224224
Pre-recorded scenarios are stored in `./src/mocks/scenarios`. However, it's possible to configure the location, by setting the `codeQL.mockGitHubApiServer.scenariosPath` configuration property in the VS Code user settings.
225225

226-
## Releasing (write access required)
227-
228-
1. Go through [our test plan](/extensions/ql-vscode/docs/test-plan.md) to ensure that the extension is working as expected.
229-
1. Double-check the `CHANGELOG.md` contains all desired change comments and has the version to be released with date at the top.
230-
* Go through all recent PRs and make sure they are properly accounted for.
231-
* Make sure all changelog entries have links back to their PR(s) if appropriate.
232-
* 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:
233-
* Making substantial new features available to all users. This can include lifting a feature flag.
234-
* Breakage in compatibility with recent versions of the CLI.
235-
* Minimum required version of VS Code is increased.
236-
* New telemetry events are added.
237-
* Deprecation or removal of commands.
238-
* 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.
239-
1. 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:
240-
* `.nvmrc` - this will enable `nvm` to automatically switch to the correct node version when you're in the project folder
241-
* `.github/workflows/main.yml` - all the "node-version: <version>" settings
242-
* `.github/workflows/release.yml` - the "node-version: <version>" setting
243-
1. Double-check that the extension `package.json` and `package-lock.json` have 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.
244-
1. Create a PR for this release:
245-
* This PR will contain any missing bits from steps 1 and 2. Most of the time, this will just be updating `CHANGELOG.md` with today's date.
246-
* Create a new branch for the release named after the new version. For example: `v1.3.6`
247-
* Create a new commit with a message the same as the branch name.
248-
* Create a PR for this branch.
249-
* Wait for the PR to be merged into `main`
250-
1. Switch to `main` and add a new tag on the `main` branch with your new version (named after the release), e.g.
251-
```bash
252-
git checkout main
253-
git tag v1.3.6
254-
```
255-
256-
If you've accidentally created a badly named tag, you can delete it via
257-
```bash
258-
git tag -d badly-named-tag
259-
```
260-
1. Push the new tag up:
261-
262-
a. If you're using a fork of the repo:
263-
264-
```bash
265-
git push upstream refs/tags/v1.3.6
266-
```
267-
268-
b. If you're working straight in this repo:
269-
270-
```bash
271-
git push origin refs/tags/v1.3.6
272-
```
273-
274-
This will trigger [a release build](https://github.com/github/vscode-codeql/releases) on Actions.
275-
276-
* **IMPORTANT** Make sure you are on the `main` branch and your local checkout is fully updated when you add the tag.
277-
* If you accidentally add the tag to the wrong ref, you can just force push it to the right one later.
278-
1. Monitor the status of the release build in the `Release` workflow in the Actions tab.
279-
* DO NOT approve the "publish" stages of the workflow yet.
280-
1. Download the VSIX from the draft GitHub release at the top of [the releases page](https://github.com/github/vscode-codeql/releases) that is created when the release build finishes.
281-
1. Unzip the `.vsix` and inspect its `package.json` to make sure the version is what you expect,
282-
or look at the source if there's any doubt the right code is being shipped.
283-
1. Install the `.vsix` file into your vscode IDE and ensure the extension can load properly. Run a single command (like run query, or add database).
284-
1. Go to the actions tab of the vscode-codeql repository and select the [Release workflow](https://github.com/github/vscode-codeql/actions?query=workflow%3ARelease).
285-
- If there is an authentication failure when publishing, be sure to check that the authentication keys haven't expired. See below.
286-
1. Approve the deployments of the correct Release workflow. This will automatically publish to Open VSX and VS Code Marketplace.
287-
1. Go to the draft GitHub release in [the releases tab of the repository](https://github.com/github/vscode-codeql/releases), click 'Edit', add some summary description, and publish it.
288-
1. Confirm the new release is marked as the latest release at <https://github.com/github/vscode-codeql/releases>.
289-
1. If documentation changes need to be published, notify documentation team that release has been made.
290-
1. Review and merge the version bump PR that is automatically created by Actions.
291-
292-
## Secrets and authentication for publishing
293-
294-
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.
295-
296-
To regenerate the Open VSX token:
297-
298-
1. Log in to the [user settings page on Open VSX](https://open-vsx.org/user-settings/namespaces).
299-
1. Make sure you are a member of the GitHub namespace.
300-
1. Go to the [Access Tokens](https://open-vsx.org/user-settings/tokens) page and generate a new token.
301-
1. Update the secret in the `publish-open-vsx` environment in the project settings.
302-
303-
To regenerate the VSCode Marketplace token, please see our internal documentation. Note that Azure DevOps PATs expire every 90 days and must be regenerated.
304-
305226
## Resources
306227

307228
* [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)

docs/releasing.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Releasing (write access required)
2+
3+
1. Go through [our test plan](/extensions/ql-vscode/docs/test-plan.md) to ensure that the extension is working as expected.
4+
1. Double-check the `CHANGELOG.md` contains all desired change comments and has the version to be released with date at the top.
5+
* Go through all recent PRs and make sure they are properly accounted for.
6+
* Make sure all changelog entries have links back to their PR(s) if appropriate.
7+
* 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:
8+
* Making substantial new features available to all users. This can include lifting a feature flag.
9+
* Breakage in compatibility with recent versions of the CLI.
10+
* Minimum required version of VS Code is increased.
11+
* New telemetry events are added.
12+
* Deprecation or removal of commands.
13+
* 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.
14+
1. 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:
15+
* `.nvmrc` - this will enable `nvm` to automatically switch to the correct node version when you're in the project folder
16+
* `.github/workflows/main.yml` - all the "node-version: <version>" settings
17+
* `.github/workflows/release.yml` - the "node-version: <version>" setting
18+
1. Double-check that the extension `package.json` and `package-lock.json` have 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.
19+
1. Create a PR for this release:
20+
* This PR will contain any missing bits from steps 1 and 2. Most of the time, this will just be updating `CHANGELOG.md` with today's date.
21+
* Create a new branch for the release named after the new version. For example: `v1.3.6`
22+
* Create a new commit with a message the same as the branch name.
23+
* Create a PR for this branch.
24+
* Wait for the PR to be merged into `main`
25+
1. Switch to `main` and add a new tag on the `main` branch with your new version (named after the release), e.g.
26+
```bash
27+
git checkout main
28+
git tag v1.3.6
29+
```
30+
31+
If you've accidentally created a badly named tag, you can delete it via
32+
```bash
33+
git tag -d badly-named-tag
34+
```
35+
1. Push the new tag up:
36+
37+
a. If you're using a fork of the repo:
38+
39+
```bash
40+
git push upstream refs/tags/v1.3.6
41+
```
42+
43+
b. If you're working straight in this repo:
44+
45+
```bash
46+
git push origin refs/tags/v1.3.6
47+
```
48+
49+
This will trigger [a release build](https://github.com/github/vscode-codeql/releases) on Actions.
50+
51+
* **IMPORTANT** Make sure you are on the `main` branch and your local checkout is fully updated when you add the tag.
52+
* If you accidentally add the tag to the wrong ref, you can just force push it to the right one later.
53+
1. Monitor the status of the release build in the `Release` workflow in the Actions tab.
54+
* DO NOT approve the "publish" stages of the workflow yet.
55+
1. Download the VSIX from the draft GitHub release at the top of [the releases page](https://github.com/github/vscode-codeql/releases) that is created when the release build finishes.
56+
1. Unzip the `.vsix` and inspect its `package.json` to make sure the version is what you expect,
57+
or look at the source if there's any doubt the right code is being shipped.
58+
1. Install the `.vsix` file into your vscode IDE and ensure the extension can load properly. Run a single command (like run query, or add database).
59+
1. Go to the actions tab of the vscode-codeql repository and select the [Release workflow](https://github.com/github/vscode-codeql/actions?query=workflow%3ARelease).
60+
- If there is an authentication failure when publishing, be sure to check that the authentication keys haven't expired. See below.
61+
1. Approve the deployments of the correct Release workflow. This will automatically publish to Open VSX and VS Code Marketplace.
62+
1. Go to the draft GitHub release in [the releases tab of the repository](https://github.com/github/vscode-codeql/releases), click 'Edit', add some summary description, and publish it.
63+
1. Confirm the new release is marked as the latest release at <https://github.com/github/vscode-codeql/releases>.
64+
1. If documentation changes need to be published, notify documentation team that release has been made.
65+
1. Review and merge the version bump PR that is automatically created by Actions.
66+
67+
## Secrets and authentication for publishing
68+
69+
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.
70+
71+
To regenerate the Open VSX token:
72+
73+
1. Log in to the [user settings page on Open VSX](https://open-vsx.org/user-settings/namespaces).
74+
1. Make sure you are a member of the GitHub namespace.
75+
1. Go to the [Access Tokens](https://open-vsx.org/user-settings/tokens) page and generate a new token.
76+
1. Update the secret in the `publish-open-vsx` environment in the project settings.
77+
78+
To regenerate the VSCode Marketplace token, please see our internal documentation. Note that Azure DevOps PATs expire every 90 days and must be regenerated.

0 commit comments

Comments
 (0)