Skip to content

Commit 0671921

Browse files
authored
Update build.yml
1 parent 9201b72 commit 0671921

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ jobs:
1010
submodules: recursive
1111
- name: Install deps
1212
run: sudo apt-get install -y git cmake zip libc++1-12 libc++abi-12-dev libc++-12-dev libc++abi1-12
13+
- name: Retrieve version
14+
run: |
15+
echo "TAG_NAME=$(cat CMakeLists.txt | grep -Po '(?<=MODLOADER_VERSION \")[^\"]+')" >> $GITHUB_OUTPUT
16+
id: version
17+
- name: Print version
18+
env:
19+
VERSION: ${{ steps.version.outputs.TAG_NAME }}
20+
run: echo "$VERSION"
1321
- name: Build
1422
run: mkdir build && cd build && cmake -DCMAKE_CXX_COMPILER=clang++-12 -DCMAKE_INSTALL_PREFIX=../sdk/ .. && make && make install && cd ..
1523
- name: Pack the SDK and modloader
@@ -31,7 +39,7 @@ jobs:
3139
if: startsWith(github.event.head_commit.message, '[Release]')
3240
with:
3341
draft: true
34-
tag_name: test-rel
42+
tag_name: ${{ steps.version.outputs.TAG_NAME }}
3543
files: |
3644
artifacts/libserver_modloader.so
3745
artifacts/mod_sdk.zip

0 commit comments

Comments
 (0)