refactor: Selenium 4 + Appium Upgrade #3
This file contains hidden or 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
| name: Windows Driver | |
| on: | |
| push: | |
| tags: | |
| - v* | |
| branches: | |
| - main | |
| paths: | |
| - tools/Legerity.WindowsDriver/** | |
| - .github/workflows/windows-driver.yml | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - tools/Legerity.WindowsDriver/** | |
| - .github/workflows/windows-driver.yml | |
| workflow_dispatch: | |
| concurrency: | |
| group: windows-driver-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| env: | |
| PROJECT: 'tools/Legerity.WindowsDriver/Legerity.WindowsDriver.csproj' | |
| BUILD_CONFIG: 'Release' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get Build Version | |
| run: | | |
| Import-Module .\build\GetBuildVersion.psm1 | |
| Write-Host $Env:GITHUB_REF | |
| $version = GetBuildVersion -VersionString $Env:GITHUB_REF | |
| echo "BUILD_VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append | |
| shell: pwsh | |
| - name: Setup .NET 10.0 | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Restore | |
| run: dotnet restore $env:PROJECT | |
| - name: Build | |
| run: dotnet build $env:PROJECT --configuration $env:BUILD_CONFIG --no-restore -p:Version=$env:BUILD_VERSION | |
| - name: Publish (win-x64) | |
| run: dotnet publish $env:PROJECT --configuration $env:BUILD_CONFIG --runtime win-x64 --self-contained -p:Version=$env:BUILD_VERSION -p:PublishSingleFile=true -o publish/win-x64 | |
| - name: Publish (win-arm64) | |
| run: dotnet publish $env:PROJECT --configuration $env:BUILD_CONFIG --runtime win-arm64 --self-contained -p:Version=$env:BUILD_VERSION -p:PublishSingleFile=true -o publish/win-arm64 | |
| - name: Package artifacts | |
| run: | | |
| Compress-Archive -Path publish/win-x64/* -DestinationPath publish/Legerity.WindowsDriver-$env:BUILD_VERSION-win-x64.zip | |
| Compress-Archive -Path publish/win-arm64/* -DestinationPath publish/Legerity.WindowsDriver-$env:BUILD_VERSION-win-arm64.zip | |
| shell: pwsh | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-driver | |
| path: publish/*.zip | |
| release: | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: windows-driver | |
| path: artifacts | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| name: Legerity Windows Driver ${{ github.ref_name }} | |
| body: | | |
| ## Legerity Windows Driver ${{ github.ref_name }} | |
| A W3C WebDriver-compliant server for Windows desktop UI testing. | |
| ### Installation | |
| 1. Download the zip for your platform below. | |
| 2. Extract to a folder (e.g. `C:\tools\Legerity.WindowsDriver`). | |
| 3. Add the folder to your system `PATH`. | |
| The driver will be automatically discovered by `LegerityWindowsDriverHelper` when on the PATH. | |
| ### What's included | |
| - `Legerity.WindowsDriver.exe` - Self-contained, no .NET runtime required. | |
| See the [documentation](https://made-apps.github.io/legerity/articles/tools/windows-driver.html) for usage details. | |
| files: artifacts/*.zip | |
| fail_on_unmatched_files: true |