We advise extension authors to publish their extensions to Open VSX as a part of their CI/CD process. See our reasoning why that is.
To make the Open VSX publishing process easier, we have provided a template of a GitHub Actions workflow.
The template performs the following:
- Publishing to GitHub Releases, the Microsoft Marketplace and Open VSX
- Uploading the
.vsix
package to GitHub Releases as assets - Manually triggers releases and publishing to Open VSX and/or Microsoft Marketplace.
- Automatic triggers from new GitHub Releases
-
First, follow the Publishing Extensions doc (only steps 1-4 are required) and take note of the access token that is returned, as you will require it in the next step.
-
To run the GitHub Action above, you need to setup two repository secrets for the Action to use:
VSCE_PAT
- the token for publishing to Microsoft's Marketplace ("Get a Personal Access Token" in VS Code's docs)OVSX_PAT
- the token for publishing to Open VSX. This token was displayed in your https://open-vsx.org user dashboard.
-
In your extension repo, create a GitHub Action with the contents of this template. You can customize this however you like, for instance:
- you can customize the release tag or the release name
- you can customize what the packaging process behaves and executes
- you can customize the workflow triggers to better fit in your workflow. See Events that trigger workflows for all the possible options.
-
Now you can test whether your config works by committing the Action file and running it from the Actions tab in your repo (select your workflow on the left and hit Run Workflow on the top right).
- note this will not work if you have removed the
workflow_dispatch
trigger for the workflow. You will need to trigger the Action some other way (e.g. creating a blank GitHub Release)
- note this will not work if you have removed the