Skip to content
Merged
Changes from 1 commit
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
99 changes: 35 additions & 64 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ jobs:
prepare:
name: Prepare Release
runs-on: ubuntu-latest
permissions:
contents: write
if: >
github.event.repository.fork == false &&
((startsWith(github.event.pull_request.head.ref, 'release-preparation-') &&
Expand All @@ -30,10 +28,6 @@ jobs:
tag: ${{ steps.tag.outputs.tag }}
version: ${{ steps.tag.outputs.version }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
token: ${{ secrets.SELENIUM_CI_TOKEN }}
- name: Extract tag and version
id: tag
env:
Expand All @@ -50,29 +44,50 @@ jobs:
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
echo "version=$(echo "$TAG" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')" >> "$GITHUB_OUTPUT"

build:
name: Build Packages
get-approval:
name: Get Approval
needs: prepare
uses: ./.github/workflows/get-approval.yml
with:
title: Release approval required
message: Approval is needed to publish ${{ needs.prepare.outputs.tag }}.
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

publish:
name: Build and Publish ${{ matrix.language }}
needs: get-approval
strategy:
fail-fast: false
matrix:
language: [java, py, rb, dotnet, node]
uses: ./.github/workflows/bazel.yml
with:
name: Build Packages
run: ./go all:package --config=release
artifact-name: release-packages
name: Publish ${{ matrix.language }}
gpg-sign: ${{ matrix.language == 'java' }}
run: ./go ${{ matrix.language }}:release
artifact-name: release-packages-${{ matrix.language }}
artifact-path: build/dist/*.*
secrets: inherit

create-release:
name: Create Draft Release
needs: [prepare, build]
github-release:
name: GitHub Release
needs: [prepare, publish]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Download release packages
- name: Download Java packages
uses: actions/download-artifact@v4
with:
name: release-packages
name: release-packages-java
Comment thread
titusfortner marked this conversation as resolved.
Outdated
- name: Download .NET packages
uses: actions/download-artifact@v4
with:
name: release-packages-dotnet
path: build/dist
Comment thread
titusfortner marked this conversation as resolved.
Outdated
Comment thread
titusfortner marked this conversation as resolved.
Outdated
- name: Delete nightly release and tag
env:
GH_TOKEN: ${{ secrets.SELENIUM_CI_TOKEN }}
Expand All @@ -83,44 +98,16 @@ jobs:
if git ls-remote --tags origin refs/tags/nightly | grep -q nightly; then
git push origin --delete refs/tags/nightly
fi
- name: Draft GitHub release
- name: Create GitHub release
uses: ncipollo/release-action@v1
with:
artifacts: "build/dist/*.*"
bodyFile: "scripts/github-actions/release_header.md"
draft: true
generateReleaseNotes: true
name: "Selenium ${{ needs.prepare.outputs.version }}"
prerelease: false
skipIfReleaseExists: true
tag: "${{ needs.prepare.outputs.tag }}"
commit: "${{ github.sha }}"

get-approval:
name: Get Approval
needs: [prepare, create-release]
if: needs.create-release.result == 'success'
uses: ./.github/workflows/get-approval.yml
with:
title: Release approval required
message: Approval is needed to publish ${{ needs.prepare.outputs.tag }}.
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

publish:
name: Publish ${{ matrix.language }}
needs: get-approval
strategy:
fail-fast: false
matrix:
language: [java, py, rb, dotnet, node]
uses: ./.github/workflows/bazel.yml
with:
name: Publish ${{ matrix.language }}
gpg-sign: ${{ matrix.language == 'java' }}
run: ./go ${{ matrix.language }}:release
secrets: inherit

verify:
name: Verify Published Packages
needs: docs
Expand All @@ -145,22 +132,6 @@ jobs:
secrets:
SELENIUM_CI_TOKEN: ${{ secrets.SELENIUM_CI_TOKEN }}

github-release:
name: GitHub Release
needs: [prepare, publish]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Publish GitHub release
uses: ncipollo/release-action@v1
with:
tag: "${{ needs.prepare.outputs.tag }}"
draft: false
allowUpdates: true
omitBodyDuringUpdate: true
omitNameDuringUpdate: true

unrestrict-trunk:
name: Unrestrict Trunk Branch
needs: verify
Expand All @@ -170,7 +141,7 @@ jobs:
secrets: inherit

reset-version:
name: Generate Version Reset
name: Generate Nightly Versions
needs: docs
uses: ./.github/workflows/bazel.yml
with:
Expand All @@ -179,7 +150,7 @@ jobs:
artifact-name: version-reset

update-version:
name: Push Version Reset
name: Push Nightly Versions
needs: [prepare, reset-version, unrestrict-trunk]
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -220,7 +191,7 @@ jobs:
on-release-failure:
name: On Release Failure
runs-on: ubuntu-latest
needs: [build, publish, docs, github-release, update-version, nightly, mirror, verify]
needs: [publish, docs, github-release, update-version, nightly, mirror, verify]
if: failure()
steps:
- uses: actions/checkout@v4
Expand Down