Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
new pipeline setup
  • Loading branch information
prasenjeetnath authored Oct 12, 2023
1 parent 7da6184 commit 99a5b14
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
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: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2

- name: Restore Packages
run: dotnet restore SourceGrid_2013.sln

- name: Build
run: msbuild -m -t:Rebuild -p:Configuration=Release -bl:continous-clearing.binlog -noconlog SourceGrid_2013.sln

- name: Archive Build Log
uses: actions/upload-artifact@v2
if: ${{ success() || failure() }}
with:
name: Compile_Solution_log
path: |
src/*.binlog
*.binlog
- 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 "continuous-clearing"
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=LicenseClearingTool::$($fileName)"
$outPath = Join-Path $outFolder $fileName
Compress-Archive -DestinationPath $outPath -Path $sourceFolder -CompressionLevel Optimal

0 comments on commit 99a5b14

Please sign in to comment.