|
| 1 | +name: Release Staging |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + types: [closed] |
| 6 | + |
| 7 | +env: |
| 8 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 9 | + |
| 10 | +jobs: |
| 11 | + github-release: |
| 12 | + if: > |
| 13 | + github.event.pull_request.merged == true && |
| 14 | + github.repository_owner == 'seleniumhq' && |
| 15 | + startsWith(github.event.pull_request.head.ref, 'release-preparation-') |
| 16 | + runs-on: ubuntu-latest |
| 17 | + steps: |
| 18 | + - name: Checkout repo |
| 19 | + uses: actions/checkout@v4 |
| 20 | + - name: Extract version from branch name |
| 21 | + id: extract_version |
| 22 | + run: | |
| 23 | + BRANCH_NAME="${{ github.event.pull_request.head.ref }}" |
| 24 | + VERSION=$(echo $BRANCH_NAME | grep -oE '[0-9]+\.[0-9]+\.[0-9]+') |
| 25 | + echo "VERSION=$VERSION" >> $GITHUB_ENV |
| 26 | + - name: Prep git |
| 27 | + run: | |
| 28 | + git config --local user.email "[email protected]" |
| 29 | + 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 |
| 40 | + - name: Setup Java |
| 41 | + uses: actions/setup-java@v3 |
| 42 | + with: |
| 43 | + java-version: 17 |
| 44 | + distribution: 'temurin' |
| 45 | + - name: Build and Stage Packages |
| 46 | + run: ./go all:package[--config=release] |
| 47 | + - name: Generate Draft Release |
| 48 | + uses: softprops/action-gh-release@v2 |
| 49 | + 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 }} |
| 56 | + draft: true |
| 57 | + generate_release_notes: true |
| 58 | + prerelease: false |
| 59 | + files: build/dist/*.* |
| 60 | + |
| 61 | + update-documentation: |
| 62 | + needs: github-release |
| 63 | + uses: ./.github/workflows/update-documentation.yml |
| 64 | + with: |
| 65 | + tag: selenium-${{ needs.github-release.outputs.version }} |
0 commit comments