Leverage Semantic Release for automated deployments
nulltoken opened this issue · comments
Currently, #12 proposes a first step to help automating releases
However, that's not the final target. The idea would be to leverage semantic release related plugins to do so.
Things to consider:
- Building the .vsix file is currently managed through
make.js
. A lot of things are done there to ensure the proper packaging. - The .vsix should include a changelog to allow users of the extension to easily know what recently changed
- The current
node make.js allDev
task dynamically generates a local .vsix with a version number that is always greater than the published one (to avoid VSCode dynamically replacing the local dev version with a more recent one from the marketplace). This currently requires the package.json to bear a meaningfulversion
Challenges:
- The changelog has to exist in the .vsix
- The current .vsix is generated within an
artifacts
folder - Semantic release dynamically generates the new version based on commit messages
- Changelog format
Ideas:
- Leverage
vscode:prepublish
package.json script hook - Use
1000.0.0
as the committed version in package.json - Use semantic release plugins to generate the changelog, then "patch" the .vsix with the generated changelog
- Use semantic release plugins to tag the commit and upload assets (source code, .vsix, changelog)
- Either use semantic-release-vsce to publish the asset or automate the publishing
Relevant: