fixing build v4

This commit is contained in:
2026-05-08 05:19:52 -04:00
parent 102fdedd66
commit a4d67d488d
2 changed files with 60 additions and 3 deletions
+43 -3
View File
@@ -90,7 +90,11 @@ jobs:
$env:PATH = "$cargoBin;$env:PATH"
node --version
npm --version
rustup --version
if (Get-Command rustup -ErrorAction SilentlyContinue) {
rustup --version
} else {
Write-Warning "rustup not found during verification; proceeding with cargo/rustc-only toolchain."
}
rustc --version
cargo --version
if (Get-Command cl.exe -ErrorAction SilentlyContinue) {
@@ -123,10 +127,31 @@ jobs:
GITHUB_RUN_NUMBER: ${{ github.run_number }}
run: node scripts/artifact-suffix.mjs
- name: Stage clean Windows artifacts
shell: pwsh
env:
ARTIFACT_SUFFIX: ${{ steps.artifact_ver.outputs.suffix }}
run: |
$outDir = "out/artifacts"
New-Item -ItemType Directory -Path $outDir -Force | Out-Null
$setup = Get-ChildItem -Recurse "out/make" -Filter "*Setup*.exe" | Select-Object -First 1
if (-not $setup) { throw "Could not find Windows Setup .exe under out/make" }
Copy-Item $setup.FullName (Join-Path $outDir "bytedraft-windows-$env:ARTIFACT_SUFFIX-setup.exe")
$nupkg = Get-ChildItem -Recurse "out/make" -Filter "*-full.nupkg" | Select-Object -First 1
if ($nupkg) {
Copy-Item $nupkg.FullName (Join-Path $outDir "bytedraft-windows-$env:ARTIFACT_SUFFIX-full.nupkg")
} else {
Write-Warning "No -full.nupkg found under out/make; uploading setup .exe only."
}
Get-ChildItem -File $outDir | ForEach-Object { Write-Host "Staged artifact: $($_.Name)" }
- uses: actions/upload-artifact@v3
with:
name: bytedraft-windows-${{ steps.artifact_ver.outputs.suffix }}
path: out/make/
path: out/artifacts/*
if-no-files-found: error
build-macos-arm64:
@@ -188,8 +213,23 @@ jobs:
GITHUB_RUN_NUMBER: ${{ github.run_number }}
run: node scripts/artifact-suffix.mjs
- name: Stage clean macOS artifacts
env:
ARTIFACT_SUFFIX: ${{ steps.artifact_ver.outputs.suffix }}
run: |
set -euo pipefail
mkdir -p out/artifacts
dmg_file="$(find out/make -type f -name '*.dmg' | head -n 1)"
if [ -z "${dmg_file}" ]; then
echo "::error::Could not find .dmg under out/make"
exit 1
fi
cp "${dmg_file}" "out/artifacts/bytedraft-macos-arm64-${ARTIFACT_SUFFIX}.dmg"
(cd out/artifacts && zip -q "bytedraft-macos-arm64-${ARTIFACT_SUFFIX}.dmg.zip" "bytedraft-macos-arm64-${ARTIFACT_SUFFIX}.dmg")
ls -lh out/artifacts
- uses: actions/upload-artifact@v3
with:
name: bytedraft-macos-arm64-${{ steps.artifact_ver.outputs.suffix }}
path: out/make/
path: out/artifacts/*
if-no-files-found: error
+17
View File
@@ -9,8 +9,25 @@ const rustBinary =
module.exports = {
packagerConfig: {
asar: true,
prune: true,
icon: 'electron/assets/icons/icon',
extraResource: ['ui/dist', rustBinary],
// Keep distributables lean: exclude source, build outputs, and CI metadata
// from the packaged app (Electron runtime + app code only).
ignore: [
/^\/\.git($|\/)/,
/^\/\.gitea($|\/)/,
/^\/\.act($|\/)/,
/^\/\.code-review-graph($|\/)/,
/^\/e2e($|\/)/,
/^\/crates($|\/)/,
/^\/target($|\/)/,
/^\/scripts($|\/)/,
/^\/test-results($|\/)/,
/^\/ui\/src($|\/)/,
/^\/ui\/tests($|\/)/,
/^\/ui\/node_modules($|\/)/,
],
},
makers: [
{