VSCE: implement nightly build & automate release
Created by: abeatrix
Summary
Close https://github.com/sourcegraph/sourcegraph/issues/34205
This PR adds and defines the VSCE_NIGHTLY
(vscode: Puppeteer tests for VS Code extension) build to the existing pipeline.
Once this PR is merged, we can then add this to buildkite with the daily
schedule setting for it to run daily / nightly.
Massive thanks to @jhchabran for giving me an intro to buildkite and pipeline, and for explaining how the schedule works!
Current Implementation
- Made a commit to the release branch
vsce/release
in a certain format eg 'minor release'. - This would trigger the pipeline to run the release build
- The pipeline will then read the commit and get the release type env based on the commit
- Check if the release type is valid, process to the release step if valid
- Update changelog by replacing "Next Release" to "Latest Release"
- Update package name in package.json to match the name we use in the Marketplace: "soucegraph"
- Run the vsce command to publish the extension with the marketplace token stored in our pipeline secret manager https://github.com/sourcegraph/infrastructure/pull/3276
- Revert changes made to both package.json and changelog to remain consistency between branches
Future Plans
Update the script so that it would make commits with the changes we made when the pipeline is run.
Test plan
A test build has been created and runs successfully for the nightly build: buildkite link
For automate release, I have tested the script using vsce package patch
instead of vsce publish patch
:
Confirmed the package is using the correct version number in package.json:
Confirmed the CHANGELOG.md has been updated accordingly:
CHANGLOG looks correct in the marketplace when installed using the package while no changes are made to the original files: