From 9dd7d5a434166426db42aa663bb8d67df815ea8c Mon Sep 17 00:00:00 2001 From: prasenjeetnath <147582543+prasenjeetnath@users.noreply.github.com> Date: Mon, 16 Oct 2023 12:35:00 +0530 Subject: [PATCH] Create build.yml --- build.yml | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 build.yml diff --git a/build.yml b/build.yml new file mode 100644 index 0000000..51c3b4f --- /dev/null +++ b/build.yml @@ -0,0 +1,65 @@ +name: Build & Test + +on: + push: + pull_request: + + +jobs: + + build: + runs-on: self-hosted + + defaults: + run: + working-directory: . + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + + - name: Restore Packages + run: Nuget restore SourceGrid_2013.sln + + - name: Build + run: | + echo "MSPATH = ${env:MSPATH}" + ${env:MSPATH} -m -t:Rebuild /p:Configuration=Release /p:Platform="Any CPU" /fl SourceGrid_2013.sln + env: + TEST: ${{ secrets.TEST }} + MSPATH: ${{ vars.MSPATH }} + + + - name: Archive Build Log + uses: actions/upload-artifact@v2 + if: ${{ success() || failure() }} + with: + name: Compile_Solution_log + path: | + *.log + + - name: Create zip + id: packageBuildResults + run: | + $sourceFolder = Join-Path $env:GITHUB_WORKSPACE "out" | Join-Path -ChildPath "*" + $outFolder = Join-Path $env:GITHUB_WORKSPACE "out" | Join-Path -ChildPath "sourcegrid" + New-Item -ItemType Directory -Force -Path $outFolder + $fileName = "sourcegrid-4.0.0.zip" + Write-Host "Filename: '$fileName'" + Write-Host "sourceFolder: '$sourceFolder'" + Write-Host "Outfolder: '$outFolder'" + Write-Host "::set-output name=sourcegrid::$($fileName)" + $outPath = Join-Path $outFolder $fileName + Compress-Archive -DestinationPath $outPath -Path $sourceFolder -CompressionLevel Optimal + - name: Archive Build Output + uses: actions/upload-artifact@v2 + with: + name: sourcegrid + path: | + out/sourcegrid + + +