diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b2af732 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,48 @@ +name: CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: windows-latest + + strategy: + fail-fast: false + matrix: + configuration: [Debug, Release] + platform: [x64] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v2 + + - name: Setup .NET 8 + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.0.x' + + - name: Restore + run: msbuild Colors.Dev.sln /t:Restore /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} + + - name: Build + run: msbuild Colors.Dev.sln /m /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: Colors.Dev-${{ matrix.configuration }}-${{ matrix.platform }} + path: | + **/bin/${{ matrix.platform }}/${{ matrix.configuration }}/** + **/${{ matrix.platform }}/${{ matrix.configuration }}/** + if-no-files-found: warn