Skip to content

Fixed prompt to install .NET 8 on first startup #130

Fixed prompt to install .NET 8 on first startup

Fixed prompt to install .NET 8 on first startup #130

name: 🛠️ .NET Desktop
on:
push:
paths-ignore: [HexEditorStructures/**, Images/**, Core/mbedTLS_AES/**, "*.*", ".github/**/util_*"]
pull_request:
paths-ignore: [HexEditorStructures/**, Images/**, Core/mbedTLS_AES/**, "*.*", ".github/**/util_*"]
# Stop the same workflow actions
concurrency:
group: ${{github.workflow}}-${{github.event.pull_request.number || github.ref}}
cancel-in-progress: true
env:
Artifact_Name: GodotPCKExplorer
Project_Name: GodotPCKExplorer.UI
MSBuild_Project_Name: Explorer\GodotPCKExplorer_UI
Bruteforcer_Project_Name: Bruteforcer\PCKBruteforcer_UI
Solution_Path: GodotPCKExplorer.sln
SDK_Name: net8.0-windows
jobs:
build:
name: Build ${{matrix.configuration}}
strategy:
fail-fast: false
matrix:
configuration: [Debug, Release]
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1
# Add nuget to cache
- name: Setup Cache
uses: actions/cache@v4
with:
path: ~/.nuget/packages
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{runner.os}}-nuget-${{hashFiles('**/*.csproj')}}
restore-keys: |
${{runner.os}}-nuget
# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore nuget packages
run: msbuild ${{env.Solution_Path}} /t:Restore /p:Configuration=${{matrix.configuration}}
- name: Build ${{env.MSBuild_Project_Name}}
shell: powershell
run: msbuild ${{env.Solution_Path}} /t:${{env.MSBuild_Project_Name}} /p:Configuration=${{matrix.configuration}} /m:4
- name: Prepare artifacts
if: matrix.configuration == 'Release'
shell: powershell
run: |
Get-ChildItem "bin/${{env.Project_Name}}/${{matrix.configuration}}/" -Directory | ForEach-Object {
Get-ChildItem $_.FullName | Where-Object { ('.pdb', '.xml').Contains($_.Extension) } | Remove-Item -Force
}
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: ${{matrix.configuration == 'Release' && env.Artifact_Name || format('{0}_{1}', env.Artifact_Name, matrix.configuration)}}
path: bin/${{env.Project_Name}}/${{matrix.configuration}}/${{env.SDK_Name}}
- name: Build ${{env.Bruteforcer_Project_Name}}
shell: powershell
run: msbuild ${{env.Solution_Path}} /t:${{env.Bruteforcer_Project_Name}} /p:Configuration=${{matrix.configuration}} /m:4
tests:
name: Tests
#needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run unit tests
shell: bash
run: dotnet test Tests -p:Parallel=0