Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

build(ci): ship Linux deb only and verify updater signature

Richie McIlroy5c397b178b5f
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 5db21572d..f65ec334e 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -280,25 +280,11 @@ jobs:
- name: Build app
working-directory: apps/desktop
- run: pnpm build:tauri --target ${{ matrix.settings.target }} --config src-tauri/tauri.prod.conf.json ${{ runner.os == 'Windows' && '--bundles nsis' || runner.os == 'Linux' && '--bundles deb,appimage --verbose' || '' }}
+ run: pnpm build:tauri --target ${{ matrix.settings.target }} --config src-tauri/tauri.prod.conf.json ${{ runner.os == 'Windows' && '--bundles nsis' || runner.os == 'Linux' && '--bundles deb --verbose' || '' }}
env:
# https://github.com/tauri-apps/tauri-action/issues/740
CI: false
- # linuxdeploy resolves each binary's dependencies with ldd. Our main
- # binary and the cap-muxer/cap-exporter/cap-cli sidecars link the
- # bundled FFmpeg libs via rpath $ORIGIN, which no longer resolves once
- # linuxdeploy copies them into AppDir/usr/bin. Point ldd at the staged
- # FFmpeg libs so it can find and bundle them instead of aborting.
LD_LIBRARY_PATH: ${{ runner.os == 'Linux' && format('{0}/target/{1}/release:{0}/target/native-deps/lib', github.workspace, matrix.settings.target) || '' }}
- # linuxdeploy chokes on `strip` for libraries using modern ELF
- # relocation (`.relr.dyn`) such as our bundled FFmpeg .so files,
- # failing with "failed to run linuxdeploy". NO_STRIP skips that step.
- NO_STRIP: ${{ runner.os == 'Linux' && 'true' || '' }}
- # appimagetool (invoked by linuxdeploy) is itself an AppImage and the
- # ubuntu-24.04 runners have no FUSE, so force extract-and-run.
- APPIMAGE_EXTRACT_AND_RUN: ${{ runner.os == 'Linux' && '1' || '' }}
- # appimagetool aborts if it can't infer the AppDir architecture; pin it.
- ARCH: ${{ runner.os == 'Linux' && 'x86_64' || '' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# codesigning
APPLE_CERTIFICATE: ${{ runner.os == 'macOS' && secrets.APPLE_CERTIFICATE || '' }}
@@ -343,8 +329,15 @@ jobs:
fi
echo "Frontend build output OK ($FE, $(wc -c < "$FE") bytes)"
+ UNSUPPORTED_ARTIFACT="$(find target/${{ matrix.settings.target }}/release/bundle -type f \( -name '*.AppImage' -o -name '*.rpm' \) -print -quit)"
+ if [[ -n "$UNSUPPORTED_ARTIFACT" ]]; then
+ echo "::error::Unexpected Linux non-deb artifact produced: $UNSUPPORTED_ARTIFACT"
+ exit 1
+ fi
+
DEB="$(find target/${{ matrix.settings.target }}/release/bundle/deb -name '*.deb' | head -n1)"
if [[ -z "$DEB" ]]; then echo "::error::No .deb produced"; exit 1; fi
+ if [[ ! -s "$DEB.sig" ]]; then echo "::error::No .deb updater signature produced next to $DEB"; exit 1; fi
echo "Inspecting $DEB"
WORK="$(mktemp -d)"
dpkg-deb -x "$DEB" "$WORK"