Browser Extension Release Process
Documentation
Creating developer accounts for browser extensions
Before releasing the browser extensions, you need to create developer accounts for the respecting platforms.
-
Join to our sg-chrome-ext-devs google group.
-
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.
-
Create an account on the Add-on developer hub.
-
Once the account is created, ask for a teammate to invite you to the Sourcegraph Org.
-
An email confirmation will be sent.
-
Once the the account has been confirmed, navigate to the ownership website and remove yourself from listed authors.
-
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/releasebranch, 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:
- Make sure the main branch is up-to-date. Run
git push origin main:bext/release. - Pushing to the
bext/releasebranch will trigger our build pipeline, which can be observed from respecting buildkite page. - Once the
Chrome Extension Releasetask 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:
- When the
bext/releasebranch 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). - The buildkite will, similar to Chrome, run a task named
Firefox Extensionrelease - Once the release task is finished check the add-on developer hub.
- If the currently build version is available and in "Approved" state then we are done.
- If it is in other state, then:
- We need to upload an non-minified version of the extension to the add-on developer hub.
- To create this non-minified package, on your local git copy, navigate to
sourcegraph/client/browser/scripts/, open the filecreate-source-zip.js, and modify thecommitIdvariable (use the sha from earlier). - Once the variable is modified, run this script by
node create-source-zip.js. It will generate asourcegraph.zipin the folder. - 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:
- On your terminal and run the command
pnpm --filter @sourcegraph/browser build. - Build will generate an Xcode project under
./sourcegraph/client/browser/build/Sourcegraph for Safari.- 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.
- Open the project using Xcode.
- Navigate to the General settings tab.
- Select the target
Sourcegraph for Safari.- Change
App CategorytoDeveloper Tools. - Increment the
Version&Buildnumbers. You can find the current numbers on the App Store Connect page.
- Change
- Select the target
Sourcegraph for Safari Extension.- Increment the
Version&Buildnumbers. You can find the current numbers on the App Store Connect page.
- Increment the
- Open
Assets.xcassetsfrom the file viewer and selectAppIcon. We need to upload the 512x512px & 1024x1024px version icons for the Mac Store. Drag & drop the files from Drive to the corresponding slots. - 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 theWindow > Organizieron the menu bar. - With the latest build selected, click on the
validatebutton. - Choose
SOURCEGRAPH INCfrom the dropdown and clicknext. - Make sure uploading the symbols is checked and click
next. - Make sure automatically managing the signing is checked and click
next.- If this is your first time signing the package, you need to create your own local distribution key.
- Once the validation is complete, click on the
Distribute App. - Make sure
App Store Connectis selected and clicknext. - Make sure
Uploadis selected and clicknext. - Choose
SOURCEGRAPH INCfrom the dropdown and clicknext. - Make sure uploading the symbols is checked and click
next. - Make sure automatically managing the signing is checked and click
next. - Validate everything on the summary page and click
upload - Once successful, you can navigate to the App Store Connect webpage and see a new version being processed.
- Once processing is done, navigate to
App Storetab and click on the blue + symbol, located next to themacOS Applabel. - Enter the version number we've previously used on step 6 and click
create. - 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.
- Scroll down to the build section and click on the blue + symbol.
- Select the build we've just uploaded and click done. (ignore compliance warning)
- Since our app communicates using https, we qualify for the export compliance. Select
Yesand clicknext. - Our use of encryption is exempt from regulations. Select
Yesand clicknext.
- Since our app communicates using https, we qualify for the export compliance. Select
- We can now click the
Savebutton andSubmit for Review.
Add status message to slack for public visibility for the org + history.
- Create a PR with updates for
client/browser/CHANGELOG.md. See example commit - Add a message to #integrations slack channel, with updates in a thread on release updates. See example message