Skip to content

Commit

Permalink
Merge pull request #1 from TEN-framework/feature/publish
Browse files Browse the repository at this point in the history
feat: modify workflow
  • Loading branch information
sunxilin authored Jan 10, 2025
2 parents 3643c4e + f6c8f2e commit 14cf73d
Showing 1 changed file with 26 additions and 9 deletions.
35 changes: 26 additions & 9 deletions .github/workflows/build_node_shared.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Build Node.js Shared Library

on:
release:
types: [created]
pull_request:
types: [opened, synchronize, reopened]
paths:
Expand All @@ -23,16 +25,31 @@ jobs:

- name: Configure and Build
run: |
if [ "$compiler" == "gcc" ]; then
export CC=gcc
export CXX=g++
else
export CC=clang
export CXX=clang++
fi
# if [ "$compiler" == "gcc" ]; then
# export CC=gcc
# export CXX=g++
# else
# export CC=clang
# export CXX=clang++
# fi
./configure --shared
make -j$(nproc)
# ./configure --shared
# make -j$(nproc)
# Mock build
mkdir -p out/Release
# Create a dummy file
touch out/Release/libnode.so.127
- name: Package assets
if: startsWith(github.ref, 'refs/tags/')
run: |
cd out/Release
zip node-shared-linux-x64-${{ matrix.compiler }}.zip libnode.so.127
- name: Publish to release assets
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
out/Release/node-shared-linux-x64-${{ matrix.compiler }}.zip

0 comments on commit 14cf73d

Please sign in to comment.