-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] Enabling workflow to be triggered manually
[skip ci]
- Loading branch information
Showing
1 changed file
with
16 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,11 @@ name: Release Staging | |
on: | ||
pull_request: | ||
types: [ closed ] | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Selenium version to release' | ||
required: true | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -11,18 +16,26 @@ env: | |
jobs: | ||
github-release: | ||
if: > | ||
github.event.pull_request.merged == true && | ||
(github.event.pull_request.merged == true && | ||
github.repository_owner == 'seleniumhq' && | ||
startsWith(github.event.pull_request.head.ref, 'release-preparation-') | ||
startsWith(github.event.pull_request.head.ref, 'release-preparation-')) || | ||
(github.event_name == 'workflow_dispatch' && | ||
github.event.inputs.version != '' && | ||
github.repository_owner == 'seleniumhq') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Extract version from branch name | ||
id: extract_version | ||
if: github.event.pull_request.merged == true | ||
run: | | ||
VERSION=$(echo $BRANCH_NAME | grep -oE '[0-9]+\.[0-9]+\.[0-9]+') | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
- name: Extract version from workflow input | ||
if: github.event_name == 'workflow_dispatch' | ||
run: | | ||
VERSION=${{ inputs.version }} | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
- name: Prep git | ||
run: | | ||
git config --local user.email "[email protected]" | ||
|