-
Notifications
You must be signed in to change notification settings - Fork 4
53 lines (42 loc) · 1.42 KB
/
build-mac.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Build MacOsX matrix
on:
workflow_dispatch:
inputs:
commitHash:
description: 'Enter the commit hash to build (leave empty to use the default branch or the branch that triggered the workflow)'
required: false
type: string
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-14, macos-13] # see available: https://github.com/actions/runner-images?tab=readme-ov-file#available-images
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches and tags
ref: ${{ github.event.inputs.commitHash || github.sha }}
- name: Set up Python environment
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Run build script
run: poetry run python tools/build.py --targets mac --commit None
- name: Check for DMG file
run: |
if [ -z "$(find dist -type f -name '*.dmg')" ]; then
echo "dmg file is missing"
exit 1
fi
- name: Upload DMG Files from dist/
uses: actions/upload-artifact@v4
with:
name: dmgs-${{ matrix.os }}
path: dist/*.dmg