[build] Prepare for release of Selenium 4.22.0 #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Staging | |
on: | |
pull_request: | |
types: [closed] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
github-release: | |
if: > | |
github.event.pull_request.merged == true && | |
startsWith(github.event.pull_request.head.ref, 'release-preparation-') | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.extract_version.outputs.version }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Extract version from branch name | |
id: extract_version | |
run: | | |
BRANCH_NAME="${{ github.event.pull_request.head.ref }}" | |
VERSION=$(echo $BRANCH_NAME | grep -oE '[0-9]+\.[0-9]+\.[0-9]+') | |
echo "version=$VERSION" >> $GITHUB_OUTPUT | |
- name: Prep git | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "Selenium CI Bot" | |
- name: Tag Release | |
run: | | |
git tag selenium-${{ steps.extract_version.outputs.version }} | |
git push origin selenium-${{ steps.extract_version.outputs.version }} | |
- name: Update Nightly Tag to Remove pre-release | |
run: | | |
git fetch --tags | |
git tag -d nightly || echo "Nightly tag not found" | |
git tag nightly | |
git push origin refs/tags/nightly --force | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- name: Build and Stage Packages | |
run: ./go all:package | |
- name: Generate Draft Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: Selenium ${{ steps.extract_version.outputs.version }} | |
body: | | |
### Detailed updates by component | |
<img src="https://raw.githubusercontent.com/github/explore/main/topics/java/java.png" width="20" height="20"> **[Java](https://github.com/SeleniumHQ/selenium/blob/trunk/java/CHANGELOG)** | | |
<img src="https://raw.githubusercontent.com/github/explore/main/topics/python/python.png" width="20" height="20"> **[Python](https://github.com/SeleniumHQ/selenium/blob/trunk/py/CHANGES)** | | |
<img src="https://raw.githubusercontent.com/github/explore/main/topics/dotnet/dotnet.png" width="20" height="20"> **[DotNet](https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/CHANGELOG)** | | |
<img src="https://raw.githubusercontent.com/github/explore/main/topics/ruby/ruby.png" width="20" height="20"> **[Ruby](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES)** | | |
<img src="https://raw.githubusercontent.com/github/explore/main/topics/javascript/javascript.png" width="20" height="20"> **[JavaScript](https://github.com/SeleniumHQ/selenium/blob/trunk/javascript/node/selenium-webdriver/CHANGES.md)** | | |
<img src="https://raw.githubusercontent.com/github/explore/main/topics/windows/windows.png" width="20" height="20"> **[IEDriver](https://github.com/SeleniumHQ/selenium/blob/trunk/cpp/iedriverserver/CHANGELOG)** | |
tag_name: selenium-${{ steps.extract_version.outputs.VERSION }} | |
draft: true | |
generate_release_notes: true | |
prerelease: false | |
files: build/dist/*.* | |
update-documentation: | |
runs-on: ubuntu-latest | |
needs: github-release | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Checkout the tagged version | |
run: | | |
git fetch --tags | |
git checkout selenium-${{ needs.github-release.outputs.version }} | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install specific version of DocFX tool | |
# Pinning to 2.75.3 to avoid breaking changes in newer versions | |
# See https://github.com/dotnet/docfx/issues/9855 | |
run: dotnet tool install --global --version 2.75.3 docfx | |
- name: Install npm dependencies | |
run: | | |
npm install | |
npm install --prefix javascript/node/selenium-webdriver | |
- name: Update Documentation | |
run: ./go all:docs | |
- name: Documentation Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.SELENIUM_CI_TOKEN }} | |
author: Selenium CI Bot <[email protected]> | |
delete-branch: true | |
branch: api-docs-${{ needs.github-release.outputs.version }} | |
base: gh-pages | |
title: Update documentation for Selenium ${{ needs.github-release.outputs.version }} | |
body: | | |
This PR updates the api documentation for all bindings | |
based on the latest released version | |
- Auto-generated by [create-pull-request][1] | |
[1]: https://github.com/peter-evans/create-pull-request | |
labels: documentation | |
draft: false |