Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
prasenjeetnath authored Oct 18, 2023
1 parent 404a19a commit 56b9061
Showing 1 changed file with 12 additions and 19 deletions.
31 changes: 12 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:

build:
runs-on: self-hosted
runs-on: windows-latest

defaults:
run:
Expand All @@ -24,6 +24,10 @@ jobs:
with:
fetch-depth: 0

- uses: actions/setup-dotnet@v3
with:
dotnet-version: '3.1.x'


- name: Setup msbuild
uses: microsoft/[email protected]
Expand All @@ -45,25 +49,14 @@ jobs:
name: Compile_Solution_log
path: |
*.log
- name: Kill files
run: |
$filedate = Get-Date -Format yyyyMddhhmmss
$zipfile = 'C:\Logs\logfiles'+ $filedate +'.zip'
New-Item -Path "c:\" -Name "Logs" -ItemType "directory" -ErrorAction SilentlyContinue
Robocopy "<Log Location>" "C:\CRLogs\" *.txt *.csv *.log /s
Get-ChildItem -Path "C:\Logs\" -Recurse | Compress-Archive -DestinationPath $zipfile -Force -ErrorAction Continue
Remove-Item -Path "C:\Logs\" -Exclude *.zip -Recurse -Force


- 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"
$sourceFolder = Join-Path $env:GITHUB_WORKSPACE "out" |
$outFolder = Join-Path $env:GITHUB_WORKSPACE "out" |
New-Item -ItemType Directory -Force -Path $outFolder
$fileName = "sourcegrid-5.0.1.zip"
Write-Host "Filename: '$fileName'"
Expand Down Expand Up @@ -91,8 +84,8 @@ jobs:
- name: Create Nuget Packages
id: createNupkg
run: |
nuget pack SourceGrid.nuspec -Version 5.0.0
Write-Host "::set-output name=nupkg-sourcegrid::sourcegrid.5.0.0.nupkg"
nuget pack SourceGrid.nuspec -Version 5.0.1
Write-Host "::set-output name=nupkg-sourcegrid::sourcegrid.5.0.1.nupkg"
- name: Archive NuGet Packages
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -127,9 +120,9 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v5.0.0
tag_name: v5.0.1
#tag_name: ${{ needs.build.outputs.semver }}
release_name: Release v5.0.0
release_name: Release v5.0.1
body: |
${{ github.event.head_commit.message }}
draft: true
Expand Down

0 comments on commit 56b9061

Please sign in to comment.