refactor: Selenium 4 + Appium Upgrade #468
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: CI | |
| on: | |
| push: | |
| tags: | |
| - v* | |
| branches: | |
| - main | |
| paths: | |
| - src/** | |
| - tests/** | |
| - build/** | |
| - tools/** | |
| - .github/workflows/ci.yml | |
| - Directory.Build.props | |
| - global.json | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - src/** | |
| - tests/** | |
| - build/** | |
| - tools/** | |
| - .github/workflows/ci.yml | |
| - Directory.Build.props | |
| - global.json | |
| workflow_dispatch: | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| env: | |
| BUILD_CONFIG: 'Release' | |
| SOLUTION: 'src/Legerity.sln' | |
| 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 dependencies | |
| run: dotnet restore $SOLUTION | |
| - name: Build | |
| run: dotnet build $SOLUTION --configuration $BUILD_CONFIG --no-restore -p:Version=$BUILD_VERSION | |
| publish: | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: windows-latest | |
| env: | |
| BUILD_CONFIG: 'Release' | |
| SOLUTION: 'src/Legerity.sln' | |
| 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 dependencies | |
| run: dotnet restore $SOLUTION | |
| - name: Build | |
| run: dotnet build $SOLUTION --configuration $BUILD_CONFIG --no-restore -p:Version=$BUILD_VERSION | |
| - name: Publish to NuGet.org | |
| run: | | |
| Get-ChildItem . -Recurse -Filter *.nupkg | ForEach-Object { | |
| dotnet nuget push $_.FullName --source 'https://api.nuget.org/v3/index.json' --api-key '${{ secrets.NUGET_API_KEY }}' --skip-duplicate | |
| } | |
| shell: pwsh |