-
-
Notifications
You must be signed in to change notification settings - Fork 4
96 lines (82 loc) · 2.62 KB
/
build.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: build
on:
push:
branches: [develop, 'feature/**']
pull_request:
branches: [develop, 'feature/**']
workflow_dispatch:
branches: [develop, 'feature/**']
jobs:
configure:
runs-on: ubuntu-latest
outputs:
build_timestamp: ${{steps.timestamp.outputs.timestamp}}
build_id: R5.1.1_${{github.run_number}}_${{steps.timestamp.outputs.timestamp}}
steps:
- name: configure build id
id: timestamp
run: echo "timestamp=$(date -u +'%Y%m%d%H%M')" >> "$GITHUB_OUTPUT"
build:
needs: configure
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: install (linux)
run: sudo apt-get install cmake pandoc ninja-build libxrandr-dev libxinerama-dev libxcursor-dev libasound2-dev libcurl4-openssl-dev
if: matrix.os == 'ubuntu-latest'
- name: install (windows)
run: choco install pandoc
if: matrix.os == 'windows-latest'
- name: install (macos)
run: brew install pandoc
if: matrix.os == 'macos-latest'
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: build (linux)
run: |
cd linux
./build.sh
if: matrix.os == 'ubuntu-latest'
- name: build (windows)
run: |
cd windows
./build.ps1
if: matrix.os == 'windows-latest'
- name: build (macos)
run: |
cd macos
./build.sh
if: matrix.os == 'macos-latest'
- uses: actions/upload-artifact@v3
with:
name: ${{needs.configure.outputs.build_id}}
path: linux/build/artifacts/*
if: matrix.os == 'ubuntu-latest'
- uses: actions/upload-artifact@v3
with:
name: ${{needs.configure.outputs.build_id}}
path: windows/build/artifacts/*
if: matrix.os == 'windows-latest'
- uses: actions/upload-artifact@v3
with:
name: ${{needs.configure.outputs.build_id}}
path: macos/build/artifacts/*
if: matrix.os == 'macos-latest'
release:
needs: [configure, build]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: ${{needs.configure.outputs.build_id}}
path: ${{runner.workspace}}/artifacts
- uses: "marvinpinto/[email protected]"
with:
repo_token: "${{secrets.GITHUB_TOKEN}}"
automatic_release_tag: "${{needs.configure.outputs.build_id}}"
prerelease: true
files: ${{runner.workspace}}/artifacts/*