|
46 | 46 | - name: Build smoke (electron-vite bundle) |
47 | 47 | run: pnpm --filter @open-codesign/desktop exec electron-vite build |
48 | 48 |
|
| 49 | + # Linux packaging smoke — actually runs electron-builder for the Linux |
| 50 | + # targets (AppImage + deb + rpm) so misconfiguration in |
| 51 | + # apps/desktop/electron-builder.yml (missing maintainer, bad icon size, |
| 52 | + # wrong artifactName, missing rpmbuild) is caught on every PR instead |
| 53 | + # of only when a tag release is cut. Runs in parallel with `check` and |
| 54 | + # only on PRs/pushes that touch packaging-relevant files so unrelated |
| 55 | + # PRs don't pay the ~4min cost. |
| 56 | + package-linux-smoke: |
| 57 | + name: Linux packaging smoke |
| 58 | + runs-on: ubuntu-latest |
| 59 | + timeout-minutes: 15 |
| 60 | + steps: |
| 61 | + - uses: actions/checkout@v4 |
| 62 | + |
| 63 | + - name: Detect packaging-relevant changes |
| 64 | + id: changes |
| 65 | + uses: dorny/paths-filter@v3 |
| 66 | + with: |
| 67 | + filters: | |
| 68 | + packaging: |
| 69 | + - 'apps/desktop/electron-builder.yml' |
| 70 | + - 'apps/desktop/package.json' |
| 71 | + - 'apps/desktop/resources/**' |
| 72 | + - 'apps/desktop/scripts/**' |
| 73 | + - '.github/workflows/ci.yml' |
| 74 | + - '.github/workflows/release.yml' |
| 75 | + - 'package.json' |
| 76 | + - 'pnpm-lock.yaml' |
| 77 | +
|
| 78 | + - name: Setup pnpm |
| 79 | + if: steps.changes.outputs.packaging == 'true' |
| 80 | + uses: pnpm/action-setup@v4 |
| 81 | + |
| 82 | + - name: Setup Node |
| 83 | + if: steps.changes.outputs.packaging == 'true' |
| 84 | + uses: actions/setup-node@v4 |
| 85 | + with: |
| 86 | + node-version-file: .nvmrc |
| 87 | + cache: pnpm |
| 88 | + |
| 89 | + - name: Install |
| 90 | + if: steps.changes.outputs.packaging == 'true' |
| 91 | + run: pnpm install --frozen-lockfile |
| 92 | + |
| 93 | + - name: Install rpmbuild |
| 94 | + if: steps.changes.outputs.packaging == 'true' |
| 95 | + run: sudo apt-get update && sudo apt-get install -y --no-install-recommends rpm |
| 96 | + |
| 97 | + - name: Build workspace |
| 98 | + if: steps.changes.outputs.packaging == 'true' |
| 99 | + run: pnpm --filter '!@open-codesign/desktop' -r build |
| 100 | + |
| 101 | + - name: Package Linux (AppImage + deb + rpm) |
| 102 | + if: steps.changes.outputs.packaging == 'true' |
| 103 | + env: |
| 104 | + CSC_IDENTITY_AUTO_DISCOVERY: 'false' |
| 105 | + run: pnpm --filter @open-codesign/desktop release |
| 106 | + |
| 107 | + - name: Assert artifacts |
| 108 | + if: steps.changes.outputs.packaging == 'true' |
| 109 | + run: | |
| 110 | + cd apps/desktop/release |
| 111 | + ls -la |
| 112 | + for ext in AppImage deb rpm; do |
| 113 | + if ! ls *."$ext" >/dev/null 2>&1; then |
| 114 | + echo "::error::no .$ext produced by electron-builder" |
| 115 | + exit 1 |
| 116 | + fi |
| 117 | + done |
| 118 | + echo "All three Linux artifacts present." |
| 119 | +
|
49 | 120 | dco: |
50 | 121 | name: DCO check |
51 | 122 | runs-on: ubuntu-latest |
|
0 commit comments