diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5285c9b7..863697e0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -90,6 +90,14 @@ jobs: - name: Install dependencies run: npm ci --ignore-scripts + - name: Install Linux native build dependencies + run: | + sudo apt-get update + sudo apt-get install -y libx11-dev libxtst-dev libxkbfile-dev libxi-dev + + - name: Remove stale uiohook build output + run: rm -rf node_modules/uiohook-napi/build + - name: Install app dependencies run: npx electron-builder install-app-deps diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fa0cc073..fda4aeea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -327,26 +327,18 @@ jobs: with: python-version: '3.11' - - name: Validate Windows signing secrets + - name: Configure Windows signing shell: pwsh env: WINDOWS_SIGNING_CERTIFICATE_P12_BASE64: ${{ secrets.WINDOWS_SIGNING_CERTIFICATE_P12_BASE64 }} WINDOWS_SIGNING_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_SIGNING_CERTIFICATE_PASSWORD }} run: | - foreach ($name in @('WINDOWS_SIGNING_CERTIFICATE_P12_BASE64', 'WINDOWS_SIGNING_CERTIFICATE_PASSWORD')) { - $value = [Environment]::GetEnvironmentVariable($name) - if ([string]::IsNullOrWhiteSpace($value)) { - Write-Error "Missing required Windows release secret: $name" - exit 1 - } + if ([string]::IsNullOrWhiteSpace($env:WINDOWS_SIGNING_CERTIFICATE_P12_BASE64) -or [string]::IsNullOrWhiteSpace($env:WINDOWS_SIGNING_CERTIFICATE_PASSWORD)) { + Write-Warning 'Windows signing secrets are missing. Building an unsigned installer.' + Add-Content -Path $env:GITHUB_ENV -Value 'CSC_IDENTITY_AUTO_DISCOVERY=false' + exit 0 } - - name: Prepare Windows signing certificate - shell: pwsh - env: - WINDOWS_SIGNING_CERTIFICATE_P12_BASE64: ${{ secrets.WINDOWS_SIGNING_CERTIFICATE_P12_BASE64 }} - WINDOWS_SIGNING_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_SIGNING_CERTIFICATE_PASSWORD }} - run: | $certPath = Join-Path $env:RUNNER_TEMP 'windows-signing-cert.p12' [IO.File]::WriteAllBytes($certPath, [Convert]::FromBase64String($env:WINDOWS_SIGNING_CERTIFICATE_P12_BASE64)) Add-Content -Path $env:GITHUB_ENV -Value "WIN_CSC_LINK=$certPath" @@ -355,6 +347,13 @@ jobs: - name: Install dependencies run: npm ci --ignore-scripts + - name: Remove stale uiohook build output + shell: pwsh + run: | + if (Test-Path node_modules/uiohook-napi/build) { + Remove-Item node_modules/uiohook-napi/build -Recurse -Force + } + - name: Install app dependencies run: npx electron-builder install-app-deps @@ -399,9 +398,17 @@ jobs: with: python-version: '3.11' + - name: Install Linux native build dependencies + run: | + sudo apt-get update + sudo apt-get install -y libx11-dev libxtst-dev libxkbfile-dev libxi-dev + - name: Install dependencies run: npm ci --ignore-scripts + - name: Remove stale uiohook build output + run: rm -rf node_modules/uiohook-napi/build + - name: Install app dependencies run: npx electron-builder install-app-deps diff --git a/build/entitlements.mac.inherit.plist b/build/entitlements.mac.inherit.plist new file mode 100644 index 00000000..83d6db86 --- /dev/null +++ b/build/entitlements.mac.inherit.plist @@ -0,0 +1,14 @@ + + + + + com.apple.security.cs.allow-jit + + com.apple.security.cs.allow-unsigned-executable-memory + + com.apple.security.cs.disable-library-validation + + com.apple.security.inherit + + + \ No newline at end of file diff --git a/build/entitlements.mac.plist b/build/entitlements.mac.plist new file mode 100644 index 00000000..7fc6b03b --- /dev/null +++ b/build/entitlements.mac.plist @@ -0,0 +1,14 @@ + + + + + com.apple.security.cs.allow-jit + + com.apple.security.cs.allow-unsigned-executable-memory + + com.apple.security.cs.disable-library-validation + + com.apple.security.device.audio-input + + + \ No newline at end of file