|
| 1 | +name: Test build (all platforms) |
| 2 | + |
| 3 | +# On-demand build of all three platforms for handing a binary to a tester, |
| 4 | +# WITHOUT cutting a release: artifacts only — no git tag, no GitHub Release, no |
| 5 | +# auto-update feed, nothing published. Every binary is UNSIGNED: |
| 6 | +# • Windows → SmartScreen warns ("More info" → "Run anyway") |
| 7 | +# • macOS → Gatekeeper blocks it (right-click → Open, or `xattr -dr |
| 8 | +# com.apple.quarantine <app>`); it is NOT notarized |
| 9 | +# • Linux → AppImage, chmod +x and run |
| 10 | +# |
| 11 | +# Two ways to run it: |
| 12 | +# • push any branch named test/** (this file must be on that branch) |
| 13 | +# • Actions tab → "Test build (all platforms)" → Run workflow |
| 14 | +# |
| 15 | +# Native module note: nfc-pcsc is a C++ addon, so each platform MUST build on |
| 16 | +# its own runner — none of this can be cross-compiled. |
| 17 | +# |
| 18 | +# Artifacts are throwaway: 7-day retention, and delete them by hand once the |
| 19 | +# test is done rather than leaving installers lying around. |
| 20 | + |
| 21 | +on: |
| 22 | + push: |
| 23 | + branches: |
| 24 | + - 'test/**' |
| 25 | + workflow_dispatch: {} |
| 26 | + |
| 27 | +permissions: |
| 28 | + contents: read |
| 29 | + |
| 30 | +# A second push to the same test branch supersedes the first — three full |
| 31 | +# Electron builds is not something to queue up twice by accident. |
| 32 | +concurrency: |
| 33 | + group: test-build-${{ github.ref }} |
| 34 | + cancel-in-progress: true |
| 35 | + |
| 36 | +jobs: |
| 37 | + build: |
| 38 | + strategy: |
| 39 | + # One platform failing must not cancel the other two — the whole point is |
| 40 | + # to see which ones break. |
| 41 | + fail-fast: false |
| 42 | + matrix: |
| 43 | + include: |
| 44 | + - os: windows-latest |
| 45 | + platform: win |
| 46 | + artifact: TigerStudio-Windows-test |
| 47 | + path: dist/*.exe |
| 48 | + - os: macos-latest |
| 49 | + platform: mac |
| 50 | + artifact: TigerStudio-macOS-test |
| 51 | + path: dist/*.dmg |
| 52 | + - os: ubuntu-latest |
| 53 | + platform: linux |
| 54 | + artifact: TigerStudio-Linux-test |
| 55 | + path: dist/*.AppImage |
| 56 | + |
| 57 | + runs-on: ${{ matrix.os }} |
| 58 | + |
| 59 | + steps: |
| 60 | + - uses: actions/checkout@v5 |
| 61 | + |
| 62 | + - uses: actions/setup-node@v5 |
| 63 | + with: |
| 64 | + node-version: 24 |
| 65 | + |
| 66 | + # Same list as the release workflow — nfc-pcsc needs the PC/SC headers, |
| 67 | + # and electron-builder needs the packaging tools. |
| 68 | + - name: Install Linux system dependencies |
| 69 | + if: matrix.os == 'ubuntu-latest' |
| 70 | + run: | |
| 71 | + sudo apt-get update -y |
| 72 | + sudo apt-get install -y \ |
| 73 | + libpcsclite-dev \ |
| 74 | + libusb-1.0-0-dev \ |
| 75 | + libudev-dev \ |
| 76 | + build-essential \ |
| 77 | + python3 \ |
| 78 | + rpm \ |
| 79 | + fakeroot |
| 80 | +
|
| 81 | + - run: npm ci |
| 82 | + |
| 83 | + - name: Build ${{ matrix.platform }} (unsigned, no publish) |
| 84 | + run: npm run build:${{ matrix.platform }}:nopublish |
| 85 | + env: |
| 86 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 87 | + # Baked in so Google sign-in works in the test build. |
| 88 | + TIGERTAG_GOOGLE_DESKTOP_CLIENT_ID: ${{ secrets.TIGERTAG_GOOGLE_DESKTOP_CLIENT_ID }} |
| 89 | + TIGERTAG_GOOGLE_DESKTOP_CLIENT_SECRET: ${{ secrets.TIGERTAG_GOOGLE_DESKTOP_CLIENT_SECRET }} |
| 90 | + # Belt and braces on macOS: without this electron-builder still hunts |
| 91 | + # the keychain for an identity and can fail the build on a runner that |
| 92 | + # has none, even with identity=null in the script. |
| 93 | + CSC_IDENTITY_AUTO_DISCOVERY: false |
| 94 | + |
| 95 | + - name: Upload ${{ matrix.platform }} artifact |
| 96 | + uses: actions/upload-artifact@v5 |
| 97 | + with: |
| 98 | + name: ${{ matrix.artifact }} |
| 99 | + path: ${{ matrix.path }} |
| 100 | + if-no-files-found: error |
| 101 | + retention-days: 7 |
0 commit comments