@@ -2,58 +2,73 @@ name: Release Staging
22
33on :
44 pull_request :
5- types : [closed]
5+ types : [ closed ]
6+ workflow_dispatch :
7+ inputs :
8+ version :
9+ description : ' Selenium version to release'
10+ required : true
611
712env :
813 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
14+ BRANCH_NAME : ${{ github.event.pull_request.head.ref }}
915
1016jobs :
1117 github-release :
1218 if : >
13- github.event.pull_request.merged == true &&
19+ ( github.event.pull_request.merged == true &&
1420 github.repository_owner == 'seleniumhq' &&
15- startsWith(github.event.pull_request.head.ref, 'release-preparation-')
21+ startsWith(github.event.pull_request.head.ref, 'release-preparation-')) ||
22+ (github.event_name == 'workflow_dispatch' &&
23+ github.event.inputs.version != '' &&
24+ github.repository_owner == 'seleniumhq')
1625 runs-on : ubuntu-latest
26+ permissions : write-all
1727 steps :
1828 - name : Checkout repo
1929 uses : actions/checkout@v4
2030 - name : Extract version from branch name
21- id : extract_version
31+ if : github.event.pull_request.merged == true
2232 run : |
23- BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
2433 VERSION=$(echo $BRANCH_NAME | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
2534 echo "VERSION=$VERSION" >> $GITHUB_ENV
35+ - name : Extract version from workflow input
36+ if : github.event_name == 'workflow_dispatch'
37+ run : |
38+ VERSION=${{ inputs.version }}
39+ echo "VERSION=$VERSION" >> $GITHUB_ENV
2640 - name : Prep git
2741 run : |
2842 git config --local user.email "[email protected] " 2943 git config --local user.name "Selenium CI Bot"
30- - name : Tag Release
31- run : |
32- git tag selenium-${{ env.VERSION }}
33- git push origin selenium-${{ env.VERSION }}
34- - name : Update Nightly Tag to Remove pre-release
35- run : |
36- git fetch --tags
37- git tag -d nightly || echo "Nightly tag not found"
38- git tag nightly
39- git push origin refs/tags/nightly --force
44+ # - name: Tag Release
45+ # run: |
46+ # git tag selenium-${{ env.VERSION }} || echo "Tag already exists"
47+ # git push origin selenium-${{ env.VERSION }} || echo "Tag already exists remotely"
4048 - name : Setup Java
4149 uses : actions/setup-java@v3
4250 with :
4351 java-version : 17
4452 distribution : ' temurin'
53+ - name : Setup curl for Ubuntu
54+ run : sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev
4555 - name : Build and Stage Packages
4656 run : ./go all:package[--config=release]
4757 - name : Generate Draft Release
48- uses : softprops/action-gh- release@v2
58+ uses : ncipollo/ release-action@v1
4959 with :
50- name : Selenium ${{ env.VERSION }}
51- body : |
52- ## Detailed Changelogs by Component
53- <img src="https://www.selenium.dev/images/programming/java.svg" width="20" height="20"> **[Java](https://github.com/SeleniumHQ/selenium/blob/trunk/java/CHANGELOG)** | <img src="https://www.selenium.dev/images/programming/python.svg" width="20" height="20"> **[Python](https://github.com/SeleniumHQ/selenium/blob/trunk/py/CHANGES)** | <img src="https://www.selenium.dev/images/programming/csharp.svg" width="20" height="20"> **[DotNet](https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/CHANGELOG)** | <img src="https://www.selenium.dev/images/programming/ruby.svg" width="20" height="20"> **[Ruby](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES)** | <img src="https://www.selenium.dev/images/programming/javascript.svg" width="20" height="20"> **[JavaScript](https://github.com/SeleniumHQ/selenium/blob/trunk/javascript/node/selenium-webdriver/CHANGES.md)** | <img src="https://www.selenium.dev/images/browsers/internet-explorer.svg" width="20" height="20"> **[IEDriver](https://github.com/SeleniumHQ/selenium/blob/trunk/cpp/iedriverserver/CHANGELOG)**
54- <br>
55- tag_name : selenium-${{ env.VERSION }}
60+ artifacts : " build/dist/*.*"
61+ bodyFile : " scripts/github-actions/release_header.md"
5662 draft : true
57- generate_release_notes : true
63+ generateReleaseNotes : true
64+ name : " Selenium ${{ env.VERSION }}"
5865 prerelease : false
59- files : build/dist/*.*
66+ skipIfReleaseExists : true
67+ tag : " selenium-${{ env.VERSION }}"
68+ commit : " ${{ github.sha }}"
69+
70+ update-documentation :
71+ needs : github-release
72+ uses : ./.github/workflows/update-documentation.yml
73+ with :
74+ tag : selenium-${{ needs.github-release.outputs.version }}
0 commit comments