diff --git a/.github/workflows/ci-rust.yml b/.github/workflows/ci-rust.yml index b5afdf805009c..9a63748a0a3ed 100644 --- a/.github/workflows/ci-rust.yml +++ b/.github/workflows/ci-rust.yml @@ -2,6 +2,15 @@ name: CI - Rust on: workflow_call: + inputs: + release: + required: false + type: string + default: false + branch: + required: false + type: string + default: trunk secrets: SELENIUM_CI_TOKEN: required: true @@ -43,6 +52,8 @@ jobs: steps: - name: "Checkout project" uses: actions/checkout@v4 + with: + ref: ${{ inputs.branch }} - name: "Update Rust" run: | rustup update @@ -71,6 +82,8 @@ jobs: steps: - name: "Checkout project" uses: actions/checkout@v4 + with: + ref: ${{ inputs.branch }} - name: "Update Rust" run: | rustup update @@ -97,6 +110,8 @@ jobs: steps: - name: "Checkout project" uses: actions/checkout@v4 + with: + ref: ${{ inputs.branch }} - name: "Update Rust" run: | rustup update @@ -125,6 +140,8 @@ jobs: steps: - name: "Checkout project" uses: actions/checkout@v4 + with: + ref: ${{ inputs.branch }} - name: "Update Rust" run: | rustup update @@ -156,6 +173,8 @@ jobs: steps: - name: "Checkout project" uses: actions/checkout@v4 + with: + ref: ${{ inputs.branch }} - name: "Update Rust" run: | rustup update @@ -186,6 +205,8 @@ jobs: steps: - name: "Checkout project" uses: actions/checkout@v4 + with: + ref: ${{ inputs.branch }} - name: "Update Rust" run: | rustup update @@ -212,7 +233,7 @@ jobs: name: "Release Binaries" runs-on: ubuntu-latest needs: [macos-stable, linux-stable, windows-stable, macos-debug, linux-debug, windows-debug] - if: github.event_name != 'schedule' && github.repository_owner == 'seleniumhq' && github.ref == 'refs/heads/trunk' + if: github.event_name != 'schedule' && (github.ref == 'refs/heads/trunk' || inputs.release == 'true') steps: - name: "Checkout selenium_manager_artifacts" uses: actions/checkout@v4 diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml new file mode 100644 index 0000000000000..5932de8bb43d6 --- /dev/null +++ b/.github/workflows/pre-release.yml @@ -0,0 +1,110 @@ +name: Release Preparation + +on: + workflow_dispatch: + inputs: + version: + description: 'Selenium version to release' + required: true + chrome_channel: + description: 'Chrome Channel for CDP' + required: true + type: choice + default: "stable" + options: + - stable + - early-stable + +jobs: + update-rust: + name: Update Rust Version + runs-on: ubuntu-latest + steps: + - name: "Checkout repo" + uses: actions/checkout@v4 + with: + persist-credentials: false + fetch-depth: 0 + fetch-tags: true + - name: "Prep git" + run: | + git config --local user.email "selenium-ci@users.noreply.github.com" + git config --local user.name "Selenium CI Bot" + if git rev-parse --verify release-${{ github.event.inputs.version }} >/dev/null 2>&1; then + git branch -D release-${{ github.event.inputs.version }} + fi + git checkout -b release-${{ github.event.inputs.version }} + - name: Update Rust Version + run: | + ./go rust:version + ./go rust:version:commit + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.SELENIUM_CI_TOKEN }} + branch: release-${{ github.event.inputs.version }} + force: true + + selenium-manager: + name: Release Selenium Manager + needs: update-rust + uses: ./.github/workflows/ci-rust.yml + with: + release: true + branch: release-${{ github.event.inputs.version }} + secrets: + SELENIUM_CI_TOKEN: ${{ secrets.SELENIUM_CI_TOKEN }} + + update-files: + name: Update Files + runs-on: ubuntu-latest + needs: selenium-manager + steps: + - name: "Checkout project" + uses: actions/checkout@v4 + with: + persist-credentials: false + fetch-depth: 0 + fetch-tags: true + ref: release-${{ github.event.inputs.version }} + - name: Install Ruby + uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1 + with: + ruby-version: '3.1' + - name: "Prep git" + run: | + git config --local user.email "selenium-ci@users.noreply.github.com" + git config --local user.name "Selenium CI Bot" + - name: Undo rust changelog commit + run: git reset HEAD~1 + - name: Update everything including early release CDP + if: ${{ github.event.inputs.chrome_channel == 'early-stable' }} + run: ./go all:prepare['Beta'] + - name: Update everything including released CDP + if: ${{ github.event.inputs.chrome_channel == 'stable' }} + run: ./go all:prepare + - name: Create Pull Request + uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.SELENIUM_CI_TOKEN }} + author: Selenium CI Bot + delete-branch: true + title: "[build] Prepare for release of Selenium ${{ github.event.inputs.version }}" + body: | + **Warning: Manually update the changelogs before merging** + + This PR: + * Updates Rust version for Selenium Manager release + * Updates Pinned browser version to coincide with new CDP release + * Adds support for new CDP version and removes old CDP version + * Selenium Manager references the new Selenium Manager release + * Updates Maven Dependencies + * Adds new authors to authors file + * Updates all versions for all bindings + * Generates *rough* change logs for each bindings (please tidy them up before merging this) + + - Auto-generated by [create-pull-request][1] + + [1]: https://github.com/peter-evans/create-pull-request + labels: C-build + draft: true diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 8f54cc9b9fdc4..e90f48a6eae73 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -16,7 +16,7 @@ jobs: pull-requests: write # for actions/stale to close stale PRs runs-on: ubuntu-latest steps: - - uses: actions/stale@v8 + - uses: actions/stale@v9 with: stale-issue-message: 'This issue is stale because it has been open 280 days with no activity. Remove stale label or comment or this will be closed in 14 days.' close-issue-message: 'This issue was closed because it has been stalled for 14 days with no activity.'