diff --git a/.github/workflows/build-publish.yml b/.github/workflows/build-publish.yml index 5b7958f..091b013 100644 --- a/.github/workflows/build-publish.yml +++ b/.github/workflows/build-publish.yml @@ -14,12 +14,15 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up .NET Core - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v3.0.3 with: - dotnet-version: 6.x + dotnet-version: 6 + + - name: NuGet Restore + run: dotnet restore - name: Build and Publish project run: dotnet publish BattleBitAPIRunner/BattleBitAPIRunner.csproj -c Release -o ./publish @@ -69,12 +72,17 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up .NET Core - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v3.0.3 with: - dotnet-version: 6.x # Updated to use .NET 6.0 + dotnet-version: 6 - name: Build project and check for errors on non-main branch commits - run: dotnet build --configuration Release --no-restore + run: | + dotnet build --configuration Release --no-restore + if [ $? -ne 0 ]; then + echo "Build failed" + exit 1 + fi \ No newline at end of file