gauntlet/.github/workflows/setup-macos.yaml
2024-08-25 11:17:38 +02:00

54 lines
1.6 KiB
YAML

name: setup macos
on:
workflow_call:
inputs:
command:
required: true
type: string
github-release-id:
type: string
jobs:
run-on-macos:
runs-on: macos-latest
steps:
# https://github.com/actions/runner-images/issues/7522#issuecomment-1556766641
- name: Kill XProtectBehaviorService
run: |
echo Killing XProtect.; sudo pkill -9 XProtect >/dev/null || true;
- uses: actions/checkout@v4
with:
submodules: true
- run: git pull
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: "https://registry.npmjs.org"
scope: '@project-gauntlet'
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- uses: dtolnay/rust-toolchain@stable
- run: brew install protobuf
- run: brew install create-dmg
- run: cargo install apple-codesign
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- run: npm ci
- run: ${{ inputs.command }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
GITHUB_RELEASE_ID: ${{ inputs.github-release-id }}
APPLE_SIGNING_KEY_PEM: ${{ secrets.APPLE_SIGNING_KEY_PEM && fromJson(secrets.APPLE_SIGNING_KEY_PEM).content }}
APPLE_SIGNING_CERT_PEM: ${{ secrets.APPLE_SIGNING_CERT_PEM && fromJson(secrets.APPLE_SIGNING_CERT_PEM).content }}
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }}