build_mac workflow (qishibo/AnotherRedisDesktopManager)
The build_mac workflow from qishibo/AnotherRedisDesktopManager, explained and optimized by Latchkey.
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 →What it does
This is the build_mac workflow from the qishibo/AnotherRedisDesktopManager repository, a real project running GitHub Actions. It is shown here with attribution under its MIT license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
name: build_mac
on:
release:
types: [published]
jobs:
build:
runs-on: macos-latest
env:
GH_TOKEN: ${{secrets.GH_TOKEN}}
CSC_LINK: ${{secrets.CSC_LINK}}
CSC_KEY_PASSWORD: ${{secrets.CSC_KEY_PASSWORD}}
APPLEID: ${{secrets.APPLEID}}
APPLEID_PASSWORD: ${{secrets.APPLEID_PASSWORD}}
steps:
- name: Import signing keychain
uses: apple-actions/import-codesign-certs@v2
with:
keychain: signing_temp
p12-file-base64: ${{secrets.CSC_LINK}}
p12-password: ${{secrets.CSC_KEY_PASSWORD}}
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 16
- run: npm ci
- run: npm run pack:prepare
# - run: npm run pack:macm1:publish
- run: npm run pack:mac:publish
- name: Cleanup keychain
if: always()
shell: bash
run: |
# Don't fail if the keychain doesn't exist.
security delete-keychain signing_temp.keychain || true
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_mac on: release: types: [published] jobs: build: timeout-minutes: 30 runs-on: macos-latest env: GH_TOKEN: ${{secrets.GH_TOKEN}} CSC_LINK: ${{secrets.CSC_LINK}} CSC_KEY_PASSWORD: ${{secrets.CSC_KEY_PASSWORD}} APPLEID: ${{secrets.APPLEID}} APPLEID_PASSWORD: ${{secrets.APPLEID_PASSWORD}} steps: - name: Import signing keychain uses: apple-actions/import-codesign-certs@v2 with: keychain: signing_temp p12-file-base64: ${{secrets.CSC_LINK}} p12-password: ${{secrets.CSC_KEY_PASSWORD}} - uses: actions/checkout@v4 - name: Use Node.js uses: actions/setup-node@v4 with: cache: 'npm' node-version: 16 - run: npm ci - run: npm run pack:prepare # - run: npm run pack:macm1:publish - run: npm run pack:mac:publish - name: Cleanup keychain if: always() shell: bash run: | # Don't fail if the keychain doesn't exist. security delete-keychain signing_temp.keychain || true
What changed
- Cache dependency installs on the setup step so they are served from cache.
- Add a job timeout so a hung step cannot burn hours of runner time.
1 third-party action is referenced by a movable tag. Pin it to the commit SHA (Latchkey resolves and applies this automatically) so a repointed tag cannot change what runs.
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:
- Dependency installs
This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.