-
Notifications
You must be signed in to change notification settings - Fork 48
60 lines (49 loc) · 1.79 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
name: Release
on:
workflow_dispatch:
inputs:
version:
description: "Version number (e.g. 1.4.0)"
required: true
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-13, windows-2019 ]
fail-fast: true
name: ${{ matrix.os }} build
steps:
- name: Install Dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt update && sudo apt install -y libgl1-mesa-dev xorg-dev libasound2-dev
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Set up MSVC compiler
if: matrix.os == 'windows-2019'
uses: ilammy/msvc-dev-cmd@v1
- name: Configure CMake
run: cmake --preset github-${{ runner.os }} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build --preset github-${{ runner.os }} --parallel 6
- name: Pack
run: cpack --preset github-${{ runner.os }}
- name: Create Changelog
run: ${{github.workspace}}/bin/tools/changelogGenerator -i ${{github.workspace}}/doc/changelog.txt -o ${{github.workspace}}/doc/changelog_split
- name: Release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
body_path: ${{github.workspace}}/doc/changelog_split/${{ github.event.inputs.version }}.txt
draft: true
prerelease: false
name: ${{ github.event.inputs.version }}
tag_name: ${{ github.event.inputs.version }}
files: |
${{github.workspace}}/build/*${{ github.event.inputs.version }}*.zip
${{github.workspace}}/build/*${{ github.event.inputs.version }}*.rpm
${{github.workspace}}/build/*${{ github.event.inputs.version }}*.deb
${{github.workspace}}/doc/changelog.txt