forked from resend/resend-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (42 loc) · 1.19 KB
/
test-install-windows.yml
File metadata and controls
48 lines (42 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Test Windows Installer
on:
pull_request:
paths:
- install.ps1
workflow_dispatch:
jobs:
test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
- name: Run install.ps1 from repo
shell: pwsh
run: .\install.ps1
- name: Verify binary exists
shell: pwsh
run: |
$exe = "$env:USERPROFILE\.resend\bin\resend.exe"
if (-not (Test-Path $exe)) {
Write-Error "Binary not found at $exe"
exit 1
}
Write-Host "Found binary at $exe"
- name: Verify binary runs
shell: pwsh
run: |
$exe = "$env:USERPROFILE\.resend\bin\resend.exe"
& $exe --version
if ($LASTEXITCODE -ne 0) {
Write-Error "resend --version failed"
exit 1
}
- name: Verify PATH was updated
shell: pwsh
run: |
$binDir = "$env:USERPROFILE\.resend\bin"
$path = [Environment]::GetEnvironmentVariable("PATH", "User")
if ($path -notlike "*$binDir*") {
Write-Error "$binDir was not added to PATH"
exit 1
}
Write-Host "PATH correctly updated"