Merge pull request #116 from FlaUI/dependabot/nuget/src/multi-4880c5f42e #256
This file contains 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: build | |
on: | |
push: | |
tags: | |
- "*" | |
branches: | |
- "main" | |
pull_request: | |
jobs: | |
build: | |
runs-on: windows-latest | |
env: | |
Configuration: Release | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
working-directory: ./src | |
- name: Build | |
run: dotnet build --no-restore --configuration $env:Configuration | |
working-directory: ./src | |
- name: Test | |
run: dotnet test --no-build --configuration $env:Configuration --verbosity normal | |
working-directory: ./src | |
# Unfortunately, --no-build does not seem to work when we publish a specific project, so we use --no-restore instead | |
# Skip adding a web.config for IIS, as we will always use Kestrel (IsTransformWebConfigDisabled=true) | |
- name: Publish | |
run: dotnet publish FlaUI.WebDriver/FlaUI.WebDriver.csproj --no-restore --configuration $env:Configuration --self-contained /p:IsTransformWebConfigDisabled=true | |
working-directory: ./src | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: FlaUI.WebDriver | |
path: ./src/FlaUI.WebDriver/bin/Release/win-x64/publish | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: ./src/FlaUI.WebDriver/bin/Release/win-x64/publish/*.* | |
generate_release_notes: true |