From ae68e3c80efa133aa5a1de545346b37e2909243b Mon Sep 17 00:00:00 2001 From: Li Jin Date: Sun, 17 Apr 2022 00:30:32 +0800 Subject: Update macos.yml --- .github/workflows/macos.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 5181be0..e7e961a 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -3,6 +3,7 @@ name: macOS on: push: branches: [ main ] + tags: 'v*.*.*' pull_request: branches: [ main ] workflow_dispatch: @@ -15,3 +16,29 @@ jobs: - uses: actions/checkout@v2 - name: build-test run: make test + - name: build for luajit + if: startsWith(github.ref, 'refs/tags/') + run: | + git clone https://github.com/LuaJIT/LuaJIT.git + cd LuaJIT + TARGET_FLAGS="-arch x86_64" MACOSX_DEPLOYMENT_TARGET=11 make + mkdir x86_64 + mv src/libluajit.a x86_64/liblua.a + MACOSX_DEPLOYMENT_TARGET=11 make clean + TARGET_FLAGS="-arch arm64" MACOSX_DEPLOYMENT_TARGET=11 make + mkdir arm64 + mv src/libluajit.a arm64/liblua.a + make shared LUAI=LuaJIT/src LUAL=LuaJIT/x86_64 TARGET_FLAGS="-arch x86_64" + mv bin/shared/yue.so yue_x86_64.so + make clean + make shared LUAI=LuaJIT/src LUAL=LuaJIT/arm64 TARGET_FLAGS="-arch arm64" + lipo -create yue_x86_64.so bin/shared/yue.so -output yue.so + zip -r yue-macos-universal-luajit-so.zip yue.so + - name: release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + ./yue-macos-universal-luajit-so.zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -- cgit v1.2.3-55-g6feb