Update dotnet-desktop.yml #14
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: .NET Desktop | |
on: | |
push: | |
branches: [ "main" ] | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
strategy: | |
matrix: | |
configuration: [Release] | |
runs-on: windows-2019 | |
env: | |
Solution_Name: SunSynkTray.sln | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup NuGet.exe for use with actions | |
# You may pin to the exact commit or the version. | |
# uses: NuGet/setup-nuget@a21f25cd3998bf370fde17e3f1b4c12c175172f9 | |
uses: NuGet/[email protected] | |
- name: Setup devenv | |
uses: seanmiddleditch/gha-setup-vsdevenv@master | |
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild | |
- name: Setup MSBuild.exe | |
uses: microsoft/[email protected] | |
- name: Install dependencies | |
run: nuget restore $env:Solution_Name | |
# how on earth is this so bad?? | |
- name: Fix Visual Studio | |
run: | | |
$current_path=pwd | |
cd "${env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild" | |
.\DisableOutOfProcBuild.exe | |
cd $current_path | |
# Create the app installer | |
- name: Create the installer package | |
run: devenv $env:Solution_Name /build "$env:Configuration" /project "SunSynkTrayInstaller" | |
env: | |
Configuration: ${{ matrix.configuration }} | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: SunSynkTrayInstaller | |
path: SunSynkTrayInstaller\Release\SunSynkTrayInstaller.msi | |
- name: Upload assets | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: SunSynkTrayInstaller\Release\SunSynkTrayInstaller.msi |