Skip to content

Commit 14cf73d

Browse files
authored
Merge pull request #1 from TEN-framework/feature/publish
feat: modify workflow
2 parents 3643c4e + f6c8f2e commit 14cf73d

File tree

1 file changed

+26
-9
lines changed

1 file changed

+26
-9
lines changed

.github/workflows/build_node_shared.yml

+26-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Build Node.js Shared Library
22

33
on:
4+
release:
5+
types: [created]
46
pull_request:
57
types: [opened, synchronize, reopened]
68
paths:
@@ -23,16 +25,31 @@ jobs:
2325

2426
- name: Configure and Build
2527
run: |
26-
if [ "$compiler" == "gcc" ]; then
27-
export CC=gcc
28-
export CXX=g++
29-
else
30-
export CC=clang
31-
export CXX=clang++
32-
fi
28+
# if [ "$compiler" == "gcc" ]; then
29+
# export CC=gcc
30+
# export CXX=g++
31+
# else
32+
# export CC=clang
33+
# export CXX=clang++
34+
# fi
3335
34-
./configure --shared
35-
make -j$(nproc)
36+
# ./configure --shared
37+
# make -j$(nproc)
3638
39+
# Mock build
40+
mkdir -p out/Release
41+
# Create a dummy file
42+
touch out/Release/libnode.so.127
43+
44+
- name: Package assets
45+
if: startsWith(github.ref, 'refs/tags/')
46+
run: |
3747
cd out/Release
3848
zip node-shared-linux-x64-${{ matrix.compiler }}.zip libnode.so.127
49+
50+
- name: Publish to release assets
51+
uses: softprops/action-gh-release@v2
52+
if: startsWith(github.ref, 'refs/tags/')
53+
with:
54+
files: |
55+
out/Release/node-shared-linux-x64-${{ matrix.compiler }}.zip

0 commit comments

Comments
 (0)