Skip to content

Commit

Permalink
github action for creating release
Browse files Browse the repository at this point in the history
  • Loading branch information
lone17 committed Apr 26, 2024
1 parent 9b38303 commit ad52a9d
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 11 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/release-installer-package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release installer package

on: push

jobs:
relase-installer-package:
runs-on: ubuntu-latest
steps:
- name: Clone the repo
uses: actions/checkout@v4
- name: Create release folder
run: |
pip install setuptools-git-versioning>=2.0,<3
mkdir kotaemon-app
setuptools-git-versioning > kotaemon-app/VERSION
cp LICENSE.txt kotaemon-app/
cp flowsettings.py kotaemon-app/
cp launch.py kotaemon-app/
cp -r scripts kotaemon-app/
zip -r kotaemon-app.zip kotaemon-app
- name: Show release folder
run: tree kotaemon-app
- name: Release
uses: softprops/action-gh-release@v2
with:
files: kotaemon-app.zip
name: test-release
draft: true
fail_on_unmatched_files: true
10 changes: 7 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
[build-system]
requires = ["setuptools >= 61.0"]
requires = ["setuptools >= 61.0", "wheel", "setuptools-git-versioning>=2.0,<3"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
include-package-data = false
packages.find.include = []

[tool.setuptools-git-versioning]
enabled = true

[project]
name = "kotaemon-app"
version = "0.0.1"
# version = "0.0.1"
dynamic = ["version"]
requires-python = ">= 3.10"
description = "Kotaemon App"
dependencies = [
"kotaemon @ git+https://github.com/Cinnamon/kotaemon.git/@main#subdirectory=libs/kotaemon",
"kotaemon @ git+https://github.com/Cinnamon/kotaemon.git@main#subdirectory=libs/kotaemon",
"ktem @ git+https://github.com/Cinnamon/kotaemon.git@main#subdirectory=libs/ktem"
]

Expand Down
19 changes: 11 additions & 8 deletions scripts/run_windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ IF %ERRORLEVEL% EQU 0 (
GOTO :end
)

CALL :print_highlight "Setup Anaconda/Miniconda"
CALL :print_highlight "Setup Miniconda"
CALL :download_and_install_miniconda
:: check if function run fail, then exit the script
IF ERRORLEVEL 1 GOTO :end
Expand All @@ -27,7 +27,7 @@ IF ERRORLEVEL 1 GOTO :end
CALL :activate_environment
IF ERRORLEVEL 1 GOTO :end

CALL :print_highlight "Install requirements"
CALL :print_highlight "Installing Kotaemon"
CALL :install_dependencies
IF ERRORLEVEL 1 GOTO :end

Expand Down Expand Up @@ -113,11 +113,14 @@ pip list | findstr /C:"kotaemon" >NUL 2>&1
IF %ERRORLEVEL% == 0 (
ECHO Dependencies are already installed
) ELSE (
ECHO Install kotaemon's requirements
CALL python -m pip install -e "%CD%\libs\kotaemon"

ECHO Install ktem's requirements
CALL python -m pip install -e "%CD%\libs\ktem"
IF EXIST "pyproject.toml" (
ECHO Source files detected. Installing from source
CALL python -m pip install -e .
) ELSE (
CALL SET /p version=<VERSION || SET version=latest
ECHO Installing kotaemon %version%
CALL python -m pip install git+https://github.com/Cinnamon/kotaemon.git@%version%
)

( CALL pip list | findstr /C:"kotaemon" >NUL 2>&1 ) || (
ECHO. && ECHO Installation failed. You may need to run the installer again.
Expand All @@ -136,7 +139,7 @@ python "%CD%\scripts\serve_local.py"
GOTO :eof

:launch_ui
CALL python "%CD%\libs\ktem\launch.py" || ( ECHO. && ECHO Will exit now... && GOTO :exit_func_with_error )
CALL python "%CD%\launch.py" || ( ECHO. && ECHO Will exit now... && GOTO :exit_func_with_error )
GOTO :eof

:print_highlight
Expand Down

0 comments on commit ad52a9d

Please sign in to comment.