release-process.md 2.3 KB
Newer Older
T
Tomas Vik 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
# Release process

You need to perform the following steps to release a new version of the extension.
These examples use version `3.0.0`:

1. Do a quick test of the extension in your local development. At this stage, you
   are only verifying there is no complete failure of the extension.
1. Update the package version in `npm version 3.0.0`. This automatically generates a changelog entry.
1. If there have been community contributions:
   1. Manually add attribution to the `CHANGELOG.md` and `CONTRIBUTORS.md`. For example:

      ```plaintext
      (Implemented|Fixed) by [@flood4life](https://gitlab.com/flood4life) with [MR !90](https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/merge_requests/90) 👍
      ```

   1. Add the contributor's entry to `CONTRIBUTORS.md`, if it doesn't exist.
1. `git push origin main` and `git push --tags`
1. Trigger the **Publish** step on the tag pipeline.
1. When the extension updates in your VS Code, do another quick check.

## Access tokens for Marketplaces

*This section applies once a year when the Microsoft VS Code Marketplace token automatically expires.*

Our [CI jobs](https://gitlab.com/gitlab-org/gitlab-vscode-extension/blob/e80e5798dbac5944ebaa52dc0dc2cb861509588e/.gitlab-ci.yml#L110-124) use the access tokens for publishing packaged extension to market places.

### How to generate tokens

#### Open VSX

1. Log in to [github.com](https://github.com/) with `GitHub vscode account`
   credentials from the "VS Code Extension" 1Password Vault.
1. Log in to [open-vsx.org](https://open-vsx.org/) with the GitHub account.
1. Go to the [Access Tokens Settings page](https://open-vsx.org/user-settings/tokens).
1. Create a new token.

#### Microsoft VS Code Marketplace

1. Sign in to [Microsoft Azure](https://azure.microsoft.com/) with `VScode Marketplace`
   credentials from the "VS Code Extension" 1Password Vault.
1. Go to **Personal Access Tokens**.
   ([Official VS Code publishing documentation](https://code.visualstudio.com/api/working-with-extensions/publishing-extension#get-a-personal-access-token)).
1. You can either:
   - Extend the expiration date of an existing token. **This is the best solution when you receive token expiration email.**
   - Generate a new token. Assign it the least privileges possible - it probably only
     needs **Marketplace - publish**.