This document outlines the requirements for the automation and distribution pipeline for the project. The goal is to establish a robust GitHub Actions workflow for building and releasing the Node.js native addon.
File: .github/workflows/release.yml
Tools: napi-build/action@v2
The workflow should be triggered by:
- Pushes to the
mainbranch. - Pushes of tags matching the pattern
v*(e.g.,v1.0.0).
The build pipeline must support the following targets to ensure cross-platform compatibility:
- Linux:
x86_64-unknown-linux-gnu - Windows:
x86_64-pc-windows-msvc - macOS:
aarch64-apple-darwin(Apple Silicon M1/M2/M3)
- NPM Publishing: Automatically upload the build artifacts to the NPM registry.
- Authentication: Use the
NPM_TOKENsecret for authentication.
To ensure successful builds, the CI environment must be configured with the necessary dependencies:
libgl1-mesa-devlibssl-devpython3
Ensure these packages are installed in the runner before the build step executes.