Skip to content
Latchkey

Build Package workflow (minbrowser/min)

The Build Package workflow from minbrowser/min, explained and optimized by Latchkey.

C

CI health: C - fair

Run this on Latchkey for self-healing, caching, and up to 58% lower cost.

Grade your own workflow free or run it on Latchkey →
Source: minbrowser/min.github/workflows/build-packages.ymlLicense Apache-2.0View source

What it does

This is the Build Package workflow from the minbrowser/min repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
name: Build Package
on: [workflow_dispatch]
jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        include:
          - os: ubuntu-latest
            cmd: npm run buildDebian
            artifact: linux-deb-package
            path: dist/app/*.deb
          - os: ubuntu-latest
            cmd: npm run buildRedhat
            artifact: linux-rpm-package
            path: dist/app/*.rpm
          - os: windows-latest
            cmd: npm run buildWindows
            artifact: windows-package
            path: |
              dist/app/*.zip
              dist/app/*.exe
          - os: macos-15
            env:
              SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
            cmd: npm run buildMacIntel
            artifact: darwin-x86-package
            path: dist/app/*.zip
          - os: macos-15
            env:
              SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
            cmd: npm run buildMacArm
            artifact: darwin-arm-package
            path: dist/app/*.zip
    env:
      SDKROOT: ${{ matrix.env.SDKROOT }}
    steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-node@v4
      with:
        node-version: 25
    - run: npm install --omit=optional
    - name: build package
      run: ${{ matrix.cmd }}
    - name: upload package
      uses: actions/upload-artifact@v4
      with:
        name: ${{ matrix.artifact }}
        path: ${{ matrix.path }}

The same workflow, on Latchkey

Estimated ~20% faster on cache hits, plus fewer wasted runs and a safer supply chain. Added and changed lines are highlighted.

name: Build Package
on: [workflow_dispatch]
jobs:
  build:
    timeout-minutes: 30
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        include:
          - os: ubuntu-latest
            cmd: npm run buildDebian
            artifact: linux-deb-package
            path: dist/app/*.deb
          - os: ubuntu-latest
            cmd: npm run buildRedhat
            artifact: linux-rpm-package
            path: dist/app/*.rpm
          - os: windows-latest
            cmd: npm run buildWindows
            artifact: windows-package
            path: |
              dist/app/*.zip
              dist/app/*.exe
          - os: macos-15
            env:
              SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
            cmd: npm run buildMacIntel
            artifact: darwin-x86-package
            path: dist/app/*.zip
          - os: macos-15
            env:
              SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
            cmd: npm run buildMacArm
            artifact: darwin-arm-package
            path: dist/app/*.zip
    env:
      SDKROOT: ${{ matrix.env.SDKROOT }}
    steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-node@v4
      with:
        cache: 'npm'
        node-version: 25
    - run: npm install --omit=optional
    - name: build package
      run: ${{ matrix.cmd }}
    - name: upload package
      uses: actions/upload-artifact@v4
      with:
        name: ${{ matrix.artifact }}
        path: ${{ matrix.path }}
 

What changed

What Latchkey heals here

This workflow has steps that commonly fail on transient issues (network, registries, flaky browsers). On Latchkey managed runners they are detected, retried, and self-healed instead of failing your build:

This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.

Actions used in this workflow