This repository was archived by the owner on Mar 24, 2026. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (94 loc) · 3.06 KB
/
Copy pathrelease.yml
File metadata and controls
99 lines (94 loc) · 3.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Release Project
on:
workflow_dispatch:
inputs:
changelog:
type: string
description: 'Changelog to replace the auto-generated one'
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-24.04
- ubuntu-24.04-arm
- windows-2022
- macos-13
- macos-15
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
if: ${{ matrix.os == 'windows-2022' }}
with:
dotnet-version: '9'
- name: Install Doxygen
uses: ssciwr/doxygen-install@v1
- name: Build Project (Linux/MacOS)
if: ${{ matrix.os != 'windows-2022' }}
run: |
sudo cmake .
sudo cmake --build . --config Release --target docs
sudo cmake .
sudo cmake --build . --config Release --target install package
sudo rm -rf build/package/_CPack_Packages/
- name: Build Project (Windows)
if: ${{ matrix.os == 'windows-2022' }}
run: |
dotnet tool install --global wix --version 5.0.2
wix extension add --global WixToolset.UI.wixext/5.0.2
cmake .
cmake --build . --config Release --target docs
cmake .
cmake --build . --config Release --target install package
rm .\build\package\_CPack_Packages\ -R -Force
- name: Archive Package Artifacts
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: LevelZ-Release-${{ runner.os }}-${{ runner.arch }}-${{ github.sha }}
path: build/package/*
overwrite: true
release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Extract Version from CMakeLists.txt
id: get_version
run: |
VERSION=$(grep -Po '(?<=set\(PROJECT_VERSION ")[^"]*' CMakeLists.txt)
echo "Extracted Version: $VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Retrieve Latest Tag
id: latest_tag
run: echo "LATEST_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: Download Release Artifacts
uses: actions/download-artifact@v4
with:
pattern: LevelZ-Release-*
path: build/package
merge-multiple: true
- name: Generate Changelog
if: ${{ github.event.inputs.changelog == '' }}
id: changelog
uses: mikepenz/release-changelog-builder-action@v5
with:
configuration: ".github/release.json"
mode: "HYBRID"
fromTag: "${{ env.LATEST_TAG }}"
toTag: "master"
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: build/package/*
tag_name: v${{ env.VERSION }}
name: v${{ env.VERSION }}
body: ${{ steps.changelog.outputs.changelog || github.event.inputs.changelog }}
draft: false
prerelease: false