Build Lua Dynamic Library #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Lua Dynamic Library | |
on: | |
workflow_dispatch: # Manual trigger | |
jobs: | |
build: | |
runs-on: macos-latest # Use a macOS environment to build the .dylib | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install Lua and CMake | |
run: | | |
brew install lua cmake | |
- name: Build Dynamic Library | |
run: | | |
mkdir -p build | |
cd build | |
cmake .. # CMakeLists.txt is in the parent directory | |
cmake --build . --config Release | |
- name: Archive built library | |
run: | | |
mkdir -p output | |
cp libmylibrary.dylib output/ # Adjusted path for output | |
- name: Upload library | |
uses: actions/upload-artifact@v2 # Updated to the latest version | |
with: | |
name: mylibrary | |
path: output/libmylibrary.dylib |