Release workflow: build with CMake
This commit is contained in:
1 parent
cd9ffa7c83
commit
9fcbc820ad
1 file changed
+8
-15
@@ -12,34 +12,27 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- name: Install build toolchain
|
||||
run: |
|
||||
if command -v apt-get >/dev/null; then
|
||||
SUDO=$(command -v sudo || true)
|
||||
$SUDO apt-get update -y
|
||||
$SUDO apt-get install -y build-essential python3
|
||||
$SUDO apt-get install -y build-essential cmake
|
||||
fi
|
||||
|
||||
- name: Install pnpm
|
||||
run: npm install -g pnpm
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile --ignore-scripts
|
||||
|
||||
- name: Build native addon
|
||||
- name: Build
|
||||
run: |
|
||||
npm install -g node-gyp
|
||||
node-gyp rebuild
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ../src
|
||||
cmake --build . --target unplayplay --config Release
|
||||
|
||||
- name: Package binary
|
||||
run: |
|
||||
NAME=unplayplay-${GITHUB_REF_NAME:-dev}-linux-x64
|
||||
mkdir -p dist-release
|
||||
tar -czf "dist-release/${NAME}.tar.gz" build/Release/*.node
|
||||
cp build/unplayplay "dist-release/${NAME}"
|
||||
tar -czf "dist-release/${NAME}.tar.gz" -C build unplayplay
|
||||
ls -la dist-release
|
||||
|
||||
- name: Create release and upload assets
|
||||
|
||||
Reference in new issue
Block a user