From dcecf657bdb657c6c04680a875d330ebea430f7e Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Fri, 7 May 2021 21:24:50 -0700 Subject: [PATCH 1/2] Update build.yml --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 97949c815..984bad73b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,11 +59,11 @@ jobs: Write-Host "Setting current version to $CurrentVersion." - - 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 + - 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 - name: Upload build artifact uses: actions/upload-artifact@v2 From c7d6b7bef772b4a235d12e590e17aeb8beda514e Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Fri, 7 May 2021 21:35:05 -0700 Subject: [PATCH 2/2] Update build.yml --- .github/workflows/build.yml | 74 +++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 984bad73b..32dc0475e 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 - - - 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) - - $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 - - Write-Host "Setting current version to $CurrentVersion." - - - 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 - - - name: Upload build artifact - uses: actions/upload-artifact@v2 - with: - path: ./Agent/bin/Remotely-MacOS-x64.zip - name: Mac-Agent-x64 + runs-on: macos-10.15 + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install .NET Core + uses: actions/setup-dotnet@v1.7.2 + + - 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 + + Write-Host "Setting current version to $CurrentVersion." + + - 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: