Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/get-approval.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Get Approval

permissions: {}

on:
workflow_call:
inputs:
title:
description: 'Notification title'
required: true
type: string
message:
description: 'Notification message'
required: true
type: string
secrets:
SLACK_WEBHOOK_URL:
required: true

jobs:
notify:
name: Send Notification
runs-on: ubuntu-latest
steps:
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_ICON_EMOJI: ":key:"
SLACK_COLOR: warning
SLACK_CHANNEL: selenium-tlc
SLACK_USERNAME: GitHub Workflows
SLACK_TITLE: ${{ inputs.title }}
SLACK_MESSAGE: ${{ inputs.message }}
MSG_MINIMAL: actions url
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}

authorize:
name: Authorize
needs: notify
runs-on: ubuntu-latest
environment: production
steps:
- name: Approved
run: echo "Approved"
44 changes: 35 additions & 9 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ permissions:
contents: read

jobs:
get-approval:
name: Get Approval
uses: ./.github/workflows/get-approval.yml
with:
title: Release approval needed
message: |
Selenium ${{ github.event.inputs.version }} release preparation started.
Please approve to lock trunk when ready.
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

update-rust:
name: Update Rust Version
Comment thread
titusfortner marked this conversation as resolved.
runs-on: ubuntu-latest
Expand Down Expand Up @@ -82,10 +93,18 @@ jobs:
run: |
git push origin --delete rust-release-${{ github.event.inputs.version }}

restrict-trunk:
name: Restrict Trunk Branch
needs: [get-approval, selenium-manager]
uses: ./.github/workflows/restrict-trunk.yml
with:
restrict: true
secrets: inherit

update-files:
name: Update Files
runs-on: ubuntu-latest
needs: selenium-manager
needs: restrict-trunk
steps:
- name: "Checkout project"
uses: actions/checkout@v4
Expand All @@ -94,11 +113,10 @@ jobs:
fetch-depth: 0
fetch-tags: true
ref: trunk
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
working-directory: 'rb'
- name: Get latest trunk
run: |
git fetch origin trunk
Comment thread
titusfortner marked this conversation as resolved.
Outdated
git reset --hard origin/trunk
- name: Setup curl for Ubuntu
run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev
- name: Setup Bazel
Expand All @@ -116,6 +134,14 @@ jobs:
run: |
git config --local user.email "[email protected]"
git config --local user.name "Selenium CI Bot"
- name: Normalize version
id: version
run: |
VERSION="${{ github.event.inputs.version }}"
if [[ "$VERSION" =~ ^[0-9]+\.[0-9]+$ ]]; then
VERSION="${VERSION}.0"
fi
echo "value=$VERSION" >> "$GITHUB_OUTPUT"
- name: Update browser versions
id: browsers
run: |
Expand Down Expand Up @@ -168,7 +194,7 @@ jobs:
fi
- name: Bump versions
run: |
./go all:version ${{ github.event.inputs.version }}
./go all:version ${{ steps.version.outputs.value }}
git commit -m "bump versions in preparation for release"
- name: Update changelogs
run: |
Expand All @@ -180,9 +206,9 @@ jobs:
token: ${{ secrets.SELENIUM_CI_TOKEN }}
author: Selenium CI Bot <[email protected]>
delete-branch: true
branch: release-preparation-${{ github.event.inputs.version }}
branch: release-preparation-${{ steps.version.outputs.value }}
base: trunk
title: "[build] Prepare for release of Selenium ${{ github.event.inputs.version }}"
title: "[build] Prepare for release of Selenium ${{ steps.version.outputs.value }}"
body: |

### Updates Applied
Expand Down