-
-
Notifications
You must be signed in to change notification settings - Fork 0
133 lines (117 loc) · 3.85 KB
/
release.yml
File metadata and controls
133 lines (117 loc) · 3.85 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: release
on:
push:
tags: ['v*']
jobs:
build:
name: ${{ matrix.os }}-${{ matrix.arch }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-latest
os: linux
arch: x64
preset: linux
artifact: LizardHook-linux-x64.tar.gz
ext: tar.gz
configure_args: ""
- runner: ubuntu-24.04-arm
os: linux
arch: arm64
preset: linux
artifact: LizardHook-linux-arm64.tar.gz
ext: tar.gz
configure_args: ""
- runner: macos-latest
os: macos
arch: x64
preset: macos
artifact: LizardHook-macos-x64.zip
ext: zip
configure_args: "-DCMAKE_OSX_ARCHITECTURES=x86_64"
- runner: macos-latest
os: macos
arch: arm64
preset: macos
artifact: LizardHook-macos-arm64.zip
ext: zip
configure_args: "-DCMAKE_OSX_ARCHITECTURES=arm64"
- runner: windows-latest
os: windows
arch: x64
preset: win-mingw
artifact: LizardHook-win-x64.zip
ext: zip
configure_args: ""
steps:
- uses: actions/checkout@v4
- name: Setup prerequisites (Linux)
if: matrix.os == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y ninja-build xorg-dev libxi-dev libxrandr-dev libxinerama-dev libxcursor-dev libx11-dev libxext-dev libasound2-dev libgtk-3-dev
- name: Setup prerequisites (macOS)
if: matrix.runner == 'macos-latest'
run: brew install ninja || true
- name: Setup MinGW (Windows)
if: matrix.runner == 'windows-latest'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
install: mingw-w64-x86_64-gcc mingw-w64-x86_64-ninja
- name: Configure
run: cmake --preset ${{ matrix.preset }} -DLIZARD_EMBED_ASSETS=ON ${{ matrix.configure_args }}
shell: bash
- name: Build
run: cmake --build build/${{ matrix.preset }} --config Release
shell: bash
- name: Install
run: cmake --install build/${{ matrix.preset }} --prefix install/${{ matrix.preset }}-${{ matrix.arch }}
shell: bash
- name: Package
run: |
cd install/${{ matrix.preset }}-${{ matrix.arch }}
if [ "${{ matrix.ext }}" = "tar.gz" ]; then
tar czf ../../${{ matrix.artifact }} *
else
zip -r ../../${{ matrix.artifact }} *
fi
shell: bash
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.artifact }}
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Read version
id: ver
run: echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT"
- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: LizardHook-*
path: dist
merge-multiple: true
- name: Generate changelog
run: |
prev_tag=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
git log ${prev_tag}..HEAD --pretty=format:'- %s' > changelog.md
- name: Create release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.ver.outputs.version }}
name: Lizard Hook v${{ steps.ver.outputs.version }}
body_path: changelog.md
files: |
dist/LizardHook-win-x64.zip
dist/LizardHook-macos-x64.zip
dist/LizardHook-macos-arm64.zip
dist/LizardHook-linux-x64.tar.gz
dist/LizardHook-linux-arm64.tar.gz