Skip to content
This repository was archived by the owner on Dec 31, 2025. It is now read-only.

Build CI

Build CI #73

Workflow file for this run

name: Build CI
on:
workflow_dispatch:
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: "true"
- name: install packages
run: sudo apt update && sudo apt-get install g++-multilib cmake
- name: cmake
run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release ..
- name: make
run: cd build && make -j4
- name: cpack
run: cd build && cpack
- name: create releases directory
run: mkdir releases
- name: move release package
run: cd build && mv cpack/*.tar.gz ../releases/samp-node-linux.tar.gz
- name: Upload to release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: releases/samp-node-linux.tar.gz
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: samp-node-linux
path: releases/samp-node-linux.tar.gz
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: "true"
- name: cmake
run: mkdir build && cd build && cmake .. -A Win32
- name: build
run: cd build && cmake --build . --config Release
- name: cpack
shell: powershell
run: $env:PATH="C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\;$env:PATH"; cd build; cpack
- name: create releases directory
run: mkdir releases
- name: move release package
run: cd build && mv cpack/*.zip ../releases/samp-node-windows.zip
- name: Upload to release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: releases/samp-node-windows.zip
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: samp-node-windows
path: releases/samp-node-windows.zip