Skip to content

Commit fa962c3

Browse files
authored
Merge pull request #102 from kurrent-io/arm64
release arm
2 parents 06f55a4 + 35cf6eb commit fa962c3

3 files changed

Lines changed: 22 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
name: Build
99
strategy:
1010
matrix:
11-
os: [ubuntu-22.04, windows-2019, macos-13]
11+
os: [ubuntu-22.04, windows-2022, macos-13, macos-14]
1212

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

.github/workflows/release.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@ jobs:
1010
name: Release
1111
strategy:
1212
matrix:
13-
os: [ubuntu-22.04, windows-2019, macos-13]
13+
include:
14+
- os: ubuntu-22.04
15+
arch: amd64
16+
- os: windows-2022
17+
arch: x64
18+
- os: macos-13
19+
arch: x64
20+
- os: macos-14
21+
arch: arm64
1422

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

@@ -38,7 +46,7 @@ jobs:
3846

3947
- name: Packaging
4048
id: package
41-
run: .\release.ps1 -Runner "${{ matrix.os }}" -Version "${{ steps.release.outputs.version}}"
49+
run: .\release.ps1 -Runner "${{ matrix.os }}" -Arch "${{ matrix.arch }}" -Version "${{ steps.release.outputs.version}}"
4250
shell: pwsh
4351

4452
- name: Upload Release Asset

release.ps1

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
[CmdletBinding()]
22
Param(
33
[Parameter(Mandatory=$true)]
4-
[ValidateSet("windows-2019", "ubuntu-22.04", "macos-13")]
4+
[ValidateSet("windows-2022", "ubuntu-22.04", "macos-13", "macos-14")]
55
[string]$Runner,
66

7+
[Parameter(Mandatory=$true)]
8+
[ValidateSet("amd64", "x64", "arm64")]
9+
[string]$Arch,
10+
711
[Parameter(Mandatory=$true)]
812
[string]$Version
913
)
@@ -49,31 +53,32 @@ switch($Runner)
4953
cargo install cargo-deb
5054
cargo deb --manifest-path=cli/Cargo.toml --output=output
5155
$artifactName = ls output
52-
$finalName = "EventStoreDB.Cloud.CLI-$Version-1.${Runner}_amd64.deb"
56+
$finalName = "EventStoreDB.Cloud.CLI-$Version-1.${Runner}_${Arch}.deb"
5357
Push-Location "output"
5458
Move-Item -Path $artifactName $finalName
5559
Write-Output "artifact_name" $finalName
5660
Write-Output "content_type" "application/vnd.debian.binary-package"
5761
Pop-Location
5862
}
5963

60-
windows-2019
64+
windows-2022
6165
{
6266
cargo build --bin esc --release
6367
Move-Item -Path (Join-Path "target" (Join-Path "release" "esc.exe")) (Join-Path "output" "esc.exe")
6468
Push-Location output
65-
$artifactName = "EventStoreDB.Cloud.CLI-Windows-x64-$Version.zip"
69+
$artifactName = "EventStoreDB.Cloud.CLI-Windows-$Arch-$Version.zip"
6670
Write-Output "artifact_name" $artifactName
6771
Write-Output "content_type" "application/zip"
6872
Compress-Archive -Path "esc.exe" -DestinationPath $artifactName
6973
Pop-Location
7074
}
7175

72-
macos-13
76+
{ $_ -in @("macos-13", "macos-14") }
7377
{
7478
cargo build --bin esc --release
7579

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

7984
New-Item -Path . -Name "macbuild" -ItemType "directory"

0 commit comments

Comments
 (0)