Skip to content

Releasing Selenium

Titus Fortner edited this page Jan 23, 2024 · 67 revisions

Release criteria

While Selenium code is tied to Chrome versions, the goal is to release a minor version of Selenium between Early Stable and Stable release dates as specified in Chromium Release Schedule

  • Communicate in Selenium Chat a reminder of upcoming releases
  • Blockers should be tracked the applicable Release Milestone
  • Check Pull Requests for anything that needs to be added to the milestone
  • Ensure CI is passing, both RBE and CI; note that the Scheduled CI are the only ones guaranteed to have everything run.

Prerequisites

Click to see Java prerequisites

Java

  1. Get a Sonatype account. Go through the initial setup if you do not have a user
  2. Request push access via this ticket example.
  3. Install GnuPG. Detailed instructions can be seen here. Follow the section that mentions how to distribute GnuPG public key. GitHub also has good instructions to generate a key.
  4. Use mvn -emp to encrypt your passphrase
  5. Make sure your ~/.m2/settings.xml contains the following lines in the <servers> and <settingsSecurity> sections:
    <server>
        <id>sonatype-nexus-snapshots</id>
        <username>_your-username-for-oss.sonatype.org_</username>
        <password>_your-password_</password>
    </server>
    <server>
        <id>sonatype-nexus-staging</id>
        <username>_your-username-for-oss.sonatype.org_</username>
        <password>_your-password_</password>
        <settingsSecurity>
            <master>{your_encrypted_passphrase}</master>
        </settingsSecurity>
    </server>
Click to see .NET prerequisites

.NET

To release a new version you will need to be registered as an owner on Nuget Obtain an API Key and store it in NUGET_API_KEY environment variable

Click to see Ruby prerequisites

Ruby

To release a new gem you will need to be registered as a gem owner on rubygems.org Generate an API key from rubygems and store it in GEM_HOST_API_KEY environment variable

Click to see Python prerequisites

Python

To release a new version you need to be registered as a Owner/Maintainer on pypi.python.org Create a token on pypi and put it in your .pypirc file. Make sure you have installed twine and it is available on your PATH (pip install twine)

Click to see JavaScript prerequisites

JavaScript

To release a new version you need to be registered as a Owner/Maintainer on npmjs

  1. Make sure you are authenticated to npmjs.com. You can do that with npm adduser
  2. Obtain an access token from npmjs
  3. Create or edit the .npmrc file in your project directory or home directory (~/.npmrc).
  4. Add a line with your token: //registry.npmjs.org/:_authToken=<YOUR_TOKEN_HERE>.

Release Preparation

Many things in Selenium need to be updated periodically and a minor release is a good time to do that. Besides, the timing of the release is likely to coincide with browser version updates.

Selenium Manager

Because Selenium Manager is not built by Bazel, it requires an extra step. Call this:

./go rust:version

Then fix up the changelog files and commit to trunk. This will kick off a GitHubActions build that will result in a new artifact with the correct version getting added to Selenium Manager Artifacts Make sure the new artifact is added before proceeding.

Everything else

./go all:prepare

This one command updates:

  • CDP version
  • Pinned browser and driver locations
  • Pinned Selenium Manager locations
  • Java Maven dependencies
  • Authors File
  • Copyright notices

For updating CDP & pinning browsers with Early stable release, pass in "Beta"

./go all:prepare["Beta"]

Review / Commit / Push / PR / Passing CI / Merge

Version updates

./go all:version

If no value is given, it will bump each version to the next minor release version as applicable (including removing the nightly/snapshot tag if necessary).

This can be run for each language as a patch release as well:

./go "rb:version[4.16.1]"

Updating version automatically adds commit messages to applicable change log, which need to be manually edited.

Review / Commit / Push

Build and Publish

Minor Release

./go all:release

This command:

  • creates release tag and pushes it
  • builds everything
  • publishes everything
  • creates release notes for GitHub release
  • updates API docs (with prompts)
  • updates nightly versions (with prompts)

Patch Release

For the given language:

./go <language>:release

This command only does the building and publishing, so need to also:

git tag selenium-${SE_VERSION}
git push origin selenium-${SE_VERSION}
./go <language>:docs

and if the release is of a language with nightly versions, just run the versions command again, it will set to nightly by default:

./go <language>:version
git commit -am "updating versions to nightly"
git push

Java

Whether major or minor release, Java has a few extra steps:

  1. Go to http://oss.sonatype.org, log in
  2. Navigate to https://oss.sonatype.org/#stagingRepositories
  3. Look in content and make sure all jars and signed files are there
  4. Close staging repository with message
  5. Wait for checks and click "release" button; if the "Release" button is not enabled, this means that the checks for the repo are still running, you can click on the activity tab to see what activities are pending. This normally takes a few minutes.

image.

IE Driver Server

Click to see IE Driver release steps
  1. Update Atoms (optional)
    • bazel build //javascript/ie-driver:header
    • copy bazel-bin/javascript/ie-driver/atoms.h to cpp/iedriver/Generated directory
  2. Open cpp/IEDriverServer.sln in Visual Studio 2022
  3. In Solution Explorer tab, right click IEDriver/Resource Files/IEDriver.rc & view code
  4. Update version number in 4 places: FILEVERSION, PRODUCTVERSION, FileVersion, ProductVersion
  5. In Solution Explorer tab, right click IEDriverServer/Resource Files/IEDriverServer.rc & view code
  6. Update version number in 4 places: FILEVERSION, PRODUCTVERSION, FileVersion, ProductVersion
  7. Solution Configurations Dropdown in toolbar at top, select Release,
  8. In Solution Platform Dropdown, select x64 & in Build menu, select Build Solution
  9. In Solution Platform Dropdown, select x86 & in Build menu, select Build Solution
  10. In build/cpp/x64/Release/IEDriverServer.exe compress file as IEDriverServer_x64_x.y.z.zip & upload it to Github Release
  11. In build/cpp/Win32/Release/IEDriverServer.exe compress file as IEDriverServer_Win32_x.y.z.zip & upload it to Github Release

Create a GitHub release

Skip this section if you are doing a patch release

  • Create a new release https://github.com/SeleniumHQ/selenium/releases/new
  • Use the recently created tag
  • Set the title to be whatever the release is.
  • Add artifacts from /build/dist to GitHub Release and publish
  • Copy contents from the markdown file in build/dist to the release description
  • Now publish the release.

Selenium Documentation Repo

Examples updates

Website updates

  • Update versions and start blog — ./scripts/release-updates.sh ${SE_VERSION}
  • Update the newly created blog post as necessary
  • Copy the github user information in console to correct places in blog post
  • Make sure dates are properly updated in selenium-clients-and-webdriver-bindings.html
  • Review / Commit / Push

Social Media

  • Twitter
  • LinkedIn
  • Mastodon
  • BlueSky
  • Threads
Clone this wiki locally