Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Build
strategy:
matrix:
os: [ubuntu-22.04, windows-2019, macos-13]
os: [ubuntu-22.04, windows-2022, macos-13, macos-14]

runs-on: ${{ matrix.os }}

Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ jobs:
name: Release
strategy:
matrix:
os: [ubuntu-22.04, windows-2019, macos-13]
include:
- os: ubuntu-22.04
arch: amd64
- os: windows-2022
arch: x64
- os: macos-13
arch: x64
- os: macos-14
arch: arm64

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -38,7 +46,7 @@ jobs:

- name: Packaging
id: package
run: .\release.ps1 -Runner "${{ matrix.os }}" -Version "${{ steps.release.outputs.version}}"
run: .\release.ps1 -Runner "${{ matrix.os }}" -Arch "${{ matrix.arch }}" -Version "${{ steps.release.outputs.version}}"
shell: pwsh

- name: Upload Release Asset
Expand Down
17 changes: 11 additions & 6 deletions release.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
[CmdletBinding()]
Param(
[Parameter(Mandatory=$true)]
[ValidateSet("windows-2019", "ubuntu-22.04", "macos-13")]
[ValidateSet("windows-2022", "ubuntu-22.04", "macos-13", "macos-14")]
[string]$Runner,

[Parameter(Mandatory=$true)]
[ValidateSet("amd64", "x64", "arm64")]
[string]$Arch,

[Parameter(Mandatory=$true)]
[string]$Version
)
Expand Down Expand Up @@ -49,31 +53,32 @@ switch($Runner)
cargo install cargo-deb
cargo deb --manifest-path=cli/Cargo.toml --output=output
$artifactName = ls output
$finalName = "EventStoreDB.Cloud.CLI-$Version-1.${Runner}_amd64.deb"
$finalName = "EventStoreDB.Cloud.CLI-$Version-1.${Runner}_${Arch}.deb"
Push-Location "output"
Move-Item -Path $artifactName $finalName
Write-Output "artifact_name" $finalName
Write-Output "content_type" "application/vnd.debian.binary-package"
Pop-Location
}

windows-2019
windows-2022
{
cargo build --bin esc --release
Move-Item -Path (Join-Path "target" (Join-Path "release" "esc.exe")) (Join-Path "output" "esc.exe")
Push-Location output
$artifactName = "EventStoreDB.Cloud.CLI-Windows-x64-$Version.zip"
$artifactName = "EventStoreDB.Cloud.CLI-Windows-$Arch-$Version.zip"
Write-Output "artifact_name" $artifactName
Write-Output "content_type" "application/zip"
Compress-Archive -Path "esc.exe" -DestinationPath $artifactName
Pop-Location
}

macos-13
{ $_ -in @("macos-13", "macos-14") }
{
cargo build --bin esc --release

$packageName = "EventStoreDB.Cloud.CLI-OSX-$Version.pkg"
$archSuffix = if ($Arch -eq "arm64") { "-arm64" } else { "" }
$packageName = "EventStoreDB.Cloud.CLI-OSX$archSuffix-$Version.pkg"
$semVer = Get-Sem-Version $Version

New-Item -Path . -Name "macbuild" -ItemType "directory"
Expand Down