diff --git a/.github/workflows/pr-build-check.yml b/.github/workflows/pr-build-check.yml new file mode 100644 index 0000000..68a995f --- /dev/null +++ b/.github/workflows/pr-build-check.yml @@ -0,0 +1,31 @@ +name: PR Build Check + +on: + pull_request: + branches: + - master + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup .NET SDK + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '10.x' + + - name: Add GitHub Package Source + env: + GHPKG_KEY: ${{ secrets.GHPKG_KEY }} + run: | + dotnet nuget add source --username denglihong2007 --password $env:GHPKG_KEY --store-password-in-clear-text --name github "https://nuget.pkg.github.com/denglihong2007/index.json" + + - name: Restore dependencies + run: dotnet restore CRSim.sln + + - name: Build + run: dotnet build CRSim.sln --configuration Release --no-restore