fix(ci): exclude *.test.ts from the desktop app tsc build #4
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Desktop Release | |
| # Builds the Wellframe Tauri desktop app into real, distributable installers. | |
| # The macOS .dmg/.app can only be produced on macOS, so this runs the native | |
| # bundle on each target OS in CI — the Linux dev box cannot emit a macOS artifact. | |
| # | |
| # Signing/notarization are wired via secrets and stay inert until you add them: | |
| # macOS: APPLE_CERTIFICATE, APPLE_CERTIFICATE_PASSWORD, APPLE_SIGNING_IDENTITY, | |
| # APPLE_ID, APPLE_PASSWORD (app-specific), APPLE_TEAM_ID | |
| # Windows: (Authenticode) configure a signing step or an EV cert action | |
| # | |
| # Trigger on a version tag (v1.2.3) to cut a draft GitHub Release with the | |
| # installers attached, or run manually via workflow_dispatch to smoke-test. | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| # tauri-action creates the GitHub Release + uploads assets, which needs write | |
| # access to repo contents. Org/private-repo default tokens are often read-only, | |
| # which fails every matrix job at the release step — grant it explicitly. | |
| permissions: | |
| contents: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: macos-latest # Apple Silicon | |
| args: '--target aarch64-apple-darwin' | |
| - platform: macos-latest # Intel | |
| args: '--target x86_64-apple-darwin' | |
| - platform: ubuntu-22.04 | |
| args: '' | |
| - platform: windows-latest | |
| args: '' | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Linux build dependencies | |
| if: matrix.platform == 'ubuntu-22.04' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev \ | |
| librsvg2-dev patchelf libgtk-3-dev | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ contains(matrix.args, 'aarch64-apple') && 'aarch64-apple-darwin' || contains(matrix.args, 'x86_64-apple') && 'x86_64-apple-darwin' || '' }} | |
| - name: Cache Rust | |
| uses: swatinem/rust-cache@v2 | |
| with: | |
| workspaces: desktop/src-tauri | |
| - name: Install frontend dependencies | |
| working-directory: desktop | |
| run: npm ci | |
| # Materialize the App Store Connect API key (.p8) used for notarization. | |
| # Stored as a base64 secret so no key file lives in the repo. Inert if the | |
| # secret is unset (empty file → notarization is skipped by the bundler). | |
| - name: Prepare Apple API key for notarization (macOS) | |
| if: startsWith(matrix.platform, 'macos') | |
| env: | |
| APPLE_API_KEY_P8: ${{ secrets.APPLE_API_KEY_P8 }} | |
| # openssl decodes portably (macOS/BSD base64 lacks GNU's --decode; -A joins wrapped lines). | |
| run: printf '%s' "$APPLE_API_KEY_P8" | openssl base64 -d -A > "$RUNNER_TEMP/apple-api-key.p8" | |
| - name: Build the app | |
| uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # macOS signing (Developer ID certificate) — required to sign the app. | |
| APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | |
| APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
| APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} | |
| # CodeYam Apple Developer Team ID — not secret, so baked in (one less secret to manage). | |
| APPLE_TEAM_ID: '88QLZH998K' | |
| # macOS notarization via App Store Connect API key. | |
| APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }} | |
| APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }} | |
| APPLE_API_KEY_PATH: ${{ runner.temp }}/apple-api-key.p8 | |
| with: | |
| projectPath: desktop | |
| tagName: ${{ github.ref_type == 'tag' && github.ref_name || '' }} | |
| releaseName: 'Wellframe ${{ github.ref_name }}' | |
| releaseDraft: true | |
| prerelease: false | |
| args: ${{ matrix.args }} |