Browser Extension Release Process

Documentation

  1. Creating developer account for browser extensions
  2. Testing Checklist
  3. Releasing Browser Extensions

Creating developer accounts for browser extensions

Before releasing the browser extensions, you need to create developer accounts for the respecting platforms.

Chrome

  1. Join to our sg-chrome-ext-devs google group.
  2. Register a new account on the Chrome Web Store. This step might require a small fee to register, you can expense this fee using the team budget.

Firefox

  1. Create an account on the Add-on developer hub.
  2. Once the account is created, ask for a teammate to invite you to the Sourcegraph Org.
  3. An email confirmation will be sent.
  4. Once the the account has been confirmed, navigate to the ownership website and remove yourself from listed authors.

Safari

  1. Ask a team member to add you to our Apple Developer group. They can send you an invitation from App Store Connect portal.

Testing Checklist

  • Manually test installation on browsers
  • Run browser extension e2e tests: sg test bext-build && sg test bext-e2e
    • Note: it will automatically run anyway before releasing from the bext/release branch, but just to make sure before actual pushing to release branch.

Releasing Browser Extensions

Chrome

The release process for Chrome is fully automated. The review process usually takes between half a day to a day. To check the status of the release, visit the developer dashboard. Deployment to the Chrome web store happen automatically in CI when the bext/release branch is updated.

Release Steps:

  1. Make sure the main branch is up-to-date. Run git push origin main:bext/release.
  2. Pushing to the bext/release branch will trigger our build pipeline, which can be observed from respecting buildkite page.
  3. Once the 🚀 Extension release task is done, the build should appear on the developer dashboard with pending review status.

Firefox

The release process for Firefox is currently semi-automated. The review process can take between half a day to multiple days. To check the status of the release, visit the add-on developer hub.

Release Steps:

  1. When the bext/release branch is updated, our build pipeline will trigger a build for the Firefox extension (take a note of the commit sha, we’ll need it later).
  2. The buildkite will, similar to Chrome, run a task named 🚀 Extension release.
  3. Once the release task is finished check the add-on developer hub.
    1. If the currently build version is available and in “Approved” state then we are done.
    2. If it is in other state, then:
      1. We need to upload an non-minified version of the extension to the add-on developer hub.
      2. To create this non-minified package, on your local git copy, navigate to sourcegraph/client/browser/scripts/, open the file create-source-zip.js, and modify the commitId variable (use the sha from earlier).
      3. Once the variable is modified, run this script by node create-source-zip.js. It will generate a sourcegraph.zip in the folder.
      4. Navigate to the add-on developer hub, click on the pending version, upload the zip that was just created and Save Changes.

Safari

The release process for Safari is currently not automated. The review process usually takes between half a day to a day. To check the status of the release, visit the App Store Connect. Steps:

  1. On your terminal and run the command yarn --cwd client/browser build.
  2. Build will generate an Xcode project under ./sourcegraph/client/browser/build/Sourcegraph for Safari.
    1. If you run into Xcode related errors, make sure that you’ve downloaded Xcode from the app store, opened it and accepted the license/terms agreements.
  3. Open the project using Xcode.
  4. Navigate to the General settings tab.
  5. Select the target Sourcegraph for Safari.
    1. Change App Category to Developer Tools.
    2. Increment the Version & Build numbers. You can find the current numbers on the App Store Connect page.
  6. Select the target Sourcegraph for Safari Extension.
    1. Increment the Version & Build numbers. You can find the current numbers on the App Store Connect page.
  7. Open Assets.xcassets from the file viewer and select AppIcon. We need to upload the 512x512px & 1024x1024px version icons for the Mac Store. Drag & drop the files from Drive to the corresponding slots.
  8. On the menu bar, navigate to Product > Achive. Once successful, the Archives modal will appear. If you ever want to re-open this modal, you can do so by navigating to the Window > Organizier on the menu bar.
  9. With the latest build selected, click on the validate button.
  10. Choose SOURCEGRAPH INC from the dropdown and click next.
  11. Make sure uploading the symbols is checked and click next.
  12. Make sure automatically managing the signing is checked and click next.
    1. If this is your first time signing the package, you need to create your own local distribution key.
  13. Once the validation is complete, click on the Distribute App.
  14. Make sure App Store Connect is selected and click next.
  15. Make sure Upload is selected and click next.
  16. Choose SOURCEGRAPH INC from the dropdown and click next.
  17. Make sure uploading the symbols is checked and click next.
  18. Make sure automatically managing the signing is checked and click next.
  19. Validate everything on the summary page and click upload
  20. Once successful, you can navigate to the App Store Connect webpage and see a new version being processed.
  21. Once processing is done, navigate to App Store tab and click on the blue + symbol, located next to the macOS App label.
  22. Enter the version number we’ve previously used on step 6 and click create.
  23. A new version will appear on the left menu. Click on this new version and fill out the information textbox with a summary of updates.
  24. Scroll down to the build section and click on the blue + symbol.
  25. Select the build we’ve just uploaded and click done. (ignore compliance warning)
    1. Since our app communicates using https, we qualify for the export compliance. Select Yes and click next.
    2. Our use of encryption is exempt from regulations. Select Yes and click next.
  26. We can now click the Save button and Submit for Review.

Add status message to slack for public visibility for the org + history.

  1. Create a PR w/ updates for the client/browser/Changelog.md. See example commit
  2. Add a message to #growth-and-integrations slack channel, with updates in a thread on release updates. See example message