-
Notifications
You must be signed in to change notification settings - Fork 20
76 lines (67 loc) · 2 KB
/
release.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Release
on:
workflow_dispatch:
jobs:
binary_release:
strategy:
fail-fast: false
matrix:
include:
- name: windows
os: windows-2019
- name: macos-xcode-universal
os: macos-12
runs-on: ${{ matrix.os }}
steps:
- uses: maxim-lobanov/setup-xcode@v1
if: ${{ contains(matrix.name, 'xcode') }}
with:
xcode-version: latest-stable
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Source release
shell: bash
working-directory: ../
run: |
cmake -P bmx/release/source_release.cmake
- name: Win64 binary release
if: ${{ contains(matrix.name, 'windows') }}
shell: bash
working-directory: ../
run: |
mkdir binary_release
cd binary_release
unzip -q ../source_release/bmx-*.zip
cd bmx-*
cmake -P release/win64_binary_release.cmake
- name: MacOS Universal binary release
if: ${{ contains(matrix.os, 'macos') }}
shell: bash
working-directory: ../
run: |
mkdir binary_release
cd binary_release
unzip -q ../source_release/bmx-*.zip
cd bmx-*
cmake -P release/macos_universal_binary_release.cmake
# actions/upload-artifact doesn't allow . and .. in paths
- name: Move artefacts into working directory
shell: bash
run: |
mv ../source_release .
mv ../binary_release/bmx-*/out/package ./binary_release
- name: Upload source release
if: ${{ contains(matrix.name, 'windows') }}
uses: actions/upload-artifact@v3
with:
name: source-release
path: |
source_release/*.zip
source_release/*.tar.gz
- name: Upload binary release
uses: actions/upload-artifact@v3
with:
name: binary-release-${{ matrix.name }}
path: |
binary_release/*.zip