From 397d1ba3cca9eafca557dfbf1c4b3c1ea2ac8826 Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Fri, 7 May 2021 21:35:05 -0700 Subject: [PATCH] Update build.yml --- .github/workflows/build.yml | 62 +++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 984bad73..32dc0475 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,44 +32,46 @@ on: default: "linux-x64" jobs: + build-mac: - runs-on: macos-10.15 - steps: - - name: Checkout - uses: actions/checkout@v2 + runs-on: macos-10.15 + + steps: + - name: Checkout + uses: actions/checkout@v2 - - name: Install .NET Core - uses: actions/setup-dotnet@v1.7.2 + - name: Install .NET Core + uses: actions/setup-dotnet@v1.7.2 - - name: Set current version - shell: powershell - run: | - $VersionString = git show -s --format=%ci - $VersionDate = [DateTimeOffset]::Parse($VersionString) + - name: Set current version + shell: pwsh + run: | + $VersionString = git show -s --format=%ci + $VersionDate = [DateTimeOffset]::Parse($VersionString) - $Year = $VersionDate.Year.ToString() - $Month = $VersionDate.Month.ToString().PadLeft(2, "0") - $Day = $VersionDate.Day.ToString().PadLeft(2, "0") - $Hour = $VersionDate.Hour.ToString().PadLeft(2, "0") - $Minute = $VersionDate.Minute.ToString().PadLeft(2, "0") - $CurrentVersion = "$Year.$Month.$Day.$Hour$Minute" - - echo "CurrentVersion=$CurrentVersion" >> $GITHUB_ENV + $Year = $VersionDate.Year.ToString() + $Month = $VersionDate.Month.ToString().PadLeft(2, "0") + $Day = $VersionDate.Day.ToString().PadLeft(2, "0") + $Hour = $VersionDate.Hour.ToString().PadLeft(2, "0") + $Minute = $VersionDate.Minute.ToString().PadLeft(2, "0") + $CurrentVersion = "$Year.$Month.$Day.$Hour$Minute" - Write-Host "Setting current version to $CurrentVersion." + echo "CurrentVersion=$CurrentVersion" >> $GITHUB_ENV - - name: Set current version - shell: powershell - run: | - dotnet publish /p:Version=$env:CurrentVersion /p:FileVersion=$env:CurrentVersion --runtime osx-x64 --configuration Release --output "./Agent/bin/publish" ".\Agent" - Compress-Archive -Path "./Agent/bin/publish/*" -DestinationPath "./Agent/bin/Remotely-MacOS-x64.zip" -Force + Write-Host "Setting current version to $CurrentVersion." - - name: Upload build artifact - uses: actions/upload-artifact@v2 - with: - path: ./Agent/bin/Remotely-MacOS-x64.zip - name: Mac-Agent-x64 + - name: Set current version + shell: pwsh + run: | + dotnet publish /p:Version=$env:CurrentVersion /p:FileVersion=$env:CurrentVersion --runtime osx-x64 --configuration Release --output "./Agent/bin/publish" ".\Agent" + Compress-Archive -Path "./Agent/bin/publish/*" -DestinationPath "./Agent/bin/Remotely-MacOS-x64.zip" -Force + + - name: Upload build artifact + uses: actions/upload-artifact@v2 + with: + path: ./Agent/bin/Remotely-MacOS-x64.zip + name: Mac-Agent-x64 build-windows: