From ad1442eef6cc3716af1f1db404812e1c620c1e5b Mon Sep 17 00:00:00 2001 From: jorystewart <37415682+jorystewart@users.noreply.github.com> Date: Tue, 9 Jul 2024 13:44:35 +0000 Subject: [PATCH] Create build-windows.yml --- .github/workflows/build-windows.yml | 42 +++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/build-windows.yml diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml new file mode 100644 index 0000000..1f4a4fa --- /dev/null +++ b/.github/workflows/build-windows.yml @@ -0,0 +1,42 @@ +# This workflow will build a .NET project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net + +name: build-windows + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build-windows: + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + - name: Setup MSBuild + uses: actions/setup-msbuild@v2 + with: + msbuild-architecture: x64 + - name: restore + run: dotnet restore + - name: Build Single-File Release + run: MSBuild.exe .\Trashman\trashman.csproj @.\build\win-x64-singlefile.rsp + - name: Build Single-File Self-Contained + run: MSBuild.exe .\Trashman\trashman.csproj @.\build\win-x64-singlefile-selfcontained.rsp + - name: Upload win-x64 artifact + uses: actions/upload-artifact@v4 + with: + name: trashman-win-x64.exe + path: .\out\net8.0\win-x64\publish\trashman.exe + - name: Upload win-x64-selfcontained artifact + uses: actions/upload-artifact@v4 + with: + name: trashman-win-x64-selfcontained.exe + path: .\out\net8.0\win-x64-selfcontained\publish\trashman.exe