-
Notifications
You must be signed in to change notification settings - Fork 609
78 lines (63 loc) · 2.06 KB
/
Copy pathrelease-mac.yml
File metadata and controls
78 lines (63 loc) · 2.06 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Release / Mac (x64)
on:
workflow_dispatch:
inputs:
branch_name:
description: 'Branch to run on'
required: true
default: 'master'
type: string
env:
VCPKG_DEFAULT_BINARY_CACHE: ${{github.workspace}}/vcpkg_cache
jobs:
build:
runs-on: macos-15-intel
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch_name }}
fetch-depth: 0
fetch-tags: true
- name: Get latest tag
id: tag
run: |
tag=$(git describe --tags --abbrev=0)
version=${tag#v}
echo "version=$version" >> "$GITHUB_OUTPUT"
- name: Download vcpkg cache
uses: actions/cache@v4
id: cache-vcpkg
with:
path: vcpkg_cache
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
- name: Ensure vcpkg cache dir
if: steps.cache-vcpkg.outputs.cache-hit != 'true'
run: mkdir vcpkg_cache
- name: Install packages
run: |
brew install automake autoconf-archive
- name: Bootstrap vcpkg
run: |
git clone https://github.com/microsoft/vcpkg "$HOME/vcpkg"
export VCPKG_ROOT="$HOME/vcpkg"
- name: Configure
run: |
cmake --preset osx-x64-release
- name: Build
run: |
cmake --build --preset osx-x64-release --parallel 4
- name: Install
run: |
cmake --install ${{github.workspace}}/build --config Release
- name: Create bundle
run: |
${{github.workspace}}/build/vcpkg_installed/x64-osx-dynamic-release/tools/qt5/bin/macdeployqt ${{github.workspace}}/build/Candle/Candle.app
- name: Create image
run: |
ln -s /Applications ${{github.workspace}}/build/Candle/Applications
hdiutil create -volname "Candle Installer" -srcfolder ${{github.workspace}}/build/Candle -ov -format UDZO candle-${{steps.tag.outputs.version}}.dmg
- name: Upload image
uses: actions/upload-artifact@v4
with:
name: candle-${{steps.tag.outputs.version}}
path: candle-${{steps.tag.outputs.version}}.dmg