Add Mac agent to Actions workflow.

This commit is contained in:
Jared Goodwin 2021-05-06 07:39:21 -07:00
parent 6d186ded1e
commit ba38080326

View File

@ -32,11 +32,50 @@ on:
default: "linux-x64"
jobs:
build-mac:
runs-on: macos-10.15
steps:
- name: Checkout
uses: actions/checkout@v2
build:
- 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
build-windows:
runs-on: windows-latest # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
needs: build-mac
env:
Solution_Name: Remotely.sln
@ -46,6 +85,13 @@ jobs:
ServerUrl: ${{ github.event.inputs.serverUrl }}
steps:
- uses: actions/download-artifact@v2
with:
name: Mac-Agent-x64
path: ./Server/wwwroot/Content/Remotely-MacOS-x64.zip
- name: Checkout
uses: actions/checkout@v2
with: