Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Release

Adam Wójcik edited this page Jan 8, 2023 · 8 revisions

🎯Aim

The aim is to automate as much as possible the release process of the CLI for M365 extension. For now not all steps are possible to be automated, in that case the aim is to have a step by step guide

👨‍💻How was it developed

Besides the steps which are done manually using GitHub codespaces (like updating version, testing, adding tag to commit etc.) some steps are automated using GitHub actions. The automated process is defined in release.yml. Currently it will run only if we push a commit with any kind of tag. Ideally we should use tags like v*.. (like v1.2.3) for releases. Each tag is then visible in the release tag section. image

The flow builds the vs code extensions and publish it to the vs code marketplace.

✅ Process

Please be aware manual steps are marked with 💪 icon and the automated are marked with 🦾 icon

  1. 💪 pull CLI for M365 repo to get the latest docs in a separate location
  2. 💪 run .ps1 script to create snippet json (do it in vs code context). .\createSnippetDefenition.ps1 -cliDocsFolderPath "D:\workspace\cli-microsoft365\docs"
  3. 💪 run .ps1 script to create samples json (do it in vs code context). .\createScriptSampleDefenition.ps1 -scriptSampleFolderPath "D:\workspace\script-samples" -cliScriptSampleFolderPath "D:\workspace\cli-microsoft365\docs\docs\sample-scripts"
  4. 💪 format the snippet and data .json files
  5. 💪 run npm run vscode:prepublish in order to build the react components and .ts files to the output
  6. 💪 hit f5 and run and test in debug the extension if works
  7. 💪 update package.json version
  8. 💪 commit and push to repo the updated version
  9. 💪 add tag to commit using git tag v1.2.12 and git push origin v1.2.12 (please be aware this does not work using vs code UI, has to be done from console)
  10. 🦾 GitHub actions - build the extension
  11. 🦾 GitHub actions - publish it to market place
  12. 🦾 Marketplace validates and updates the version

🤔 Things to consider

In order to be able to automate more (for example the running and testing, I should create more unit tests to be able to check 100% of extension functionality). After that the step 1, 2 and 3 might be done with a script

Clone this wiki locally