diff --git a/.github/workflows/dotnet.yml b/.github/workflows/build-linux.yml similarity index 58% rename from .github/workflows/dotnet.yml rename to .github/workflows/build-linux.yml index 396d7fc..58bd8cb 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/build-linux.yml @@ -1,10 +1,9 @@ -name: .NET +name: Build Linux on: push: branches: [ "main" ] pull_request: - branches: [ "main" ] jobs: build: @@ -23,3 +22,12 @@ jobs: run: dotnet build --no-restore - name: Test run: dotnet test --no-build --verbosity normal + + - name: Publish + run: dotnet publish + + - name: Upload WebApp1 Build Artifact + uses: actions/upload-artifact@v2 + with: + name: CanaryLauncher + path: /home/runner/work/CanaryLauncherUpdate/CanaryLauncherUpdate/bin/Debug/net6.0-windows/publish/ diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml new file mode 100644 index 0000000..f031ee4 --- /dev/null +++ b/.github/workflows/build-windows.yml @@ -0,0 +1,50 @@ +--- +name: Build Windows + +on: + push: + branches: [ "main" ] + pull_request: + +jobs: + + build: + + strategy: + matrix: + configuration: [Release] + + runs-on: windows-latest + + env: + Solution_Name: CanaryLauncherUpdate.csproj + Test_Project_Path: CanaryLauncherUpdate.csproj + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + # Install the .NET Core workload + - name: Install .NET Core + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 6.0.x + + # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild + - name: Setup MSBuild.exe + uses: microsoft/setup-msbuild@v1.0.2 + + # Execute all unit tests in the solution + - name: Execute unit tests + run: dotnet test + + - name: Publish + run: dotnet publish + + - name: Upload Build Artifact + uses: actions/upload-artifact@v2 + with: + name: CanaryLauncher + path: D:\a\CanaryLauncherUpdate\CanaryLauncherUpdate\bin\Debug\net6.0-windows\publish\