From b80d33904e61629c7ba3bb7f24d5b57769794fbe Mon Sep 17 00:00:00 2001 From: Hien To Date: Wed, 26 Jun 2024 13:23:42 +0700 Subject: [PATCH] Add Installer for linux --- .github/workflows/cortex-build.yml | 28 ++++++++++++++++++++++++++++ cortex-js/control.template | 9 +++++++++ 2 files changed, 37 insertions(+) create mode 100644 cortex-js/control.template diff --git a/.github/workflows/cortex-build.yml b/.github/workflows/cortex-build.yml index dd7ba4805..9b22dc1b0 100644 --- a/.github/workflows/cortex-build.yml +++ b/.github/workflows/cortex-build.yml @@ -422,6 +422,16 @@ jobs: cp cortex installer/cortex pkgbuild --identifier ai.cortex.pkg --install-location ./usr/local/bin/ --root ./installer cortex-installer.pkg + - name: Create MacOS PKG Installer + if: runner.os == 'Linux' + run: | + cd cortex-js + mkdir -p cortexso/DEBIAN + mkdir -p cortexso/usr/local/bin + sed "s/Version:/Version: ${{ needs.create-draft-release.outputs.version }}/g" control.template > cortexso/DEBIAN/control + cp cortex cortexso/usr/local/bin/cortex + dpkg-deb --build cortexso + - name: Compile .ISS to .EXE Installer uses: Minionguyjpro/Inno-Setup-Action@v1.2.2 if: runner.os == 'Windows' @@ -463,6 +473,14 @@ jobs: name: cortex-installer-${{ matrix.os }}-${{ matrix.name }} path: | ./cortex-js/setup.exe + + - name: Upload Linux Installer + if: runner.os == 'Linux' + uses: actions/upload-artifact@v2 + with: + name: cortex-installer-${{ matrix.os }}-${{ matrix.name }} + path: | + ./cortex-js/cortexso.deb - name: Upload MacOS Installer if: runner.os == 'macOS' @@ -492,6 +510,16 @@ jobs: asset_name: cortex-${{ needs.create-draft-release.outputs.version }}-${{ matrix.name }}-${{ matrix.os }}.tar.gz asset_content_type: application/gzip + - uses: actions/upload-release-asset@v1.0.1 + if: runner.os == 'Linux' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.create-draft-release.outputs.upload_url }} + asset_path: ./cortex-js/cortexso.deb + asset_name: cortex-installer-${{ needs.create-draft-release.outputs.version }}-${{ matrix.name }}-${{ matrix.os }}.deb + asset_content_type: application/gzip + update_release_draft: needs: [build-and-test, build-cortex-single-binary] permissions: diff --git a/cortex-js/control.template b/cortex-js/control.template new file mode 100644 index 000000000..92a6e7a2a --- /dev/null +++ b/cortex-js/control.template @@ -0,0 +1,9 @@ +Package: cortexso +Version: +Section: base +Priority: optional +Architecture: amd64 +Depends: openmpi-bin,libopenmpi-dev +Maintainer: Homebrew Pte Ltd +Description: Cortex + Cortex is an OpenAI-compatible AI engine that developers can use to build LLM apps. It is packaged with a Docker-inspired command-line interface and client libraries. It can be used as a standalone server or imported as a library.