-
Notifications
You must be signed in to change notification settings - Fork 11
50 lines (48 loc) · 1.37 KB
/
macos.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
name: "MacOS"
on:
push:
pull_request:
jobs:
build-macos:
name: ${{ matrix.os }} Build FreeOrion SDK
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13]
env:
CMAKE_BUILD_PARALLEL_LEVEL: 2
HOMEBREW_NO_AUTO_UPDATE: 1
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Configure
run: |
mkdir build
cd build
xcodes select 14.1
cmake -DCMAKE_XCODE_BUILD_SYSTEM=1 ..
- name: Build
run: |
cd build
cmake --build . --config RelWithDebInfo
- name: Artifact
uses: actions/upload-artifact@v4
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
with:
name: MacOS SDK
path: |
build/FreeOrionSDK_*.tar.bz2
- name: Prepare Release
if: startsWith(github.ref, 'refs/tags/v')
id: prepare-release-options
run: |
echo "release-name=$(git tag -ln --format '%(subject)' ${{ github.ref_name }})" >> $GITHUB_OUTPUT
- uses: softprops/action-gh-release@v1
name: Release
if: startsWith(github.ref, 'refs/tags/v')
with:
name: ${{ steps.prepare-release-options.outputs.release-name }}
draft: true
files: |
build/FreeOrionSDK_*.tar.bz2
token: ${{ secrets.RELEASE_TOKEN }}