diff --git a/.github/workflows/build-portable-release-cuda.yml b/.github/workflows/build-portable-release-cuda.yml index 571cbac0..a63ec168 100644 --- a/.github/workflows/build-portable-release-cuda.yml +++ b/.github/workflows/build-portable-release-cuda.yml @@ -101,7 +101,13 @@ jobs: - name: Build Package shell: bash run: | - rm -rf .git cmd* update_wizard* Colab-TextGen-GPU.ipynb docker + VERSION_CLEAN="${{ inputs.version }}" + VERSION_CLEAN="${VERSION_CLEAN#v}" + cd .. + cp -r text-generation-webui "text-generation-webui-${VERSION_CLEAN}" + cd "text-generation-webui-${VERSION_CLEAN}" + + rm -rf .git cmd* update_wizard* Colab-TextGen-GPU.ipynb docker setup.cfg allowed=("character_bias" "gallery" "openai" "sd_api_pictures") find extensions/ -mindepth 1 -maxdepth 1 -type d | grep -v -E "$(printf '%s|' "${allowed[@]}" | sed 's/|$//')" | xargs rm -rf @@ -116,14 +122,12 @@ jobs: PYTHON_URL="https://github.com/astral-sh/python-build-standalone/releases/download/20250409/cpython-3.11.12+20250409-x86_64-pc-windows-msvc-install_only.tar.gz" PIP_PATH="portable_env/python.exe -m pip" PACKAGES_PATH="portable_env/Lib/site-packages" - ZIP_CMD="powershell -Command \"Compress-Archive -Path text-generation-webui -DestinationPath" rm start_linux.sh start_macos.sh else PLATFORM="linux" PYTHON_URL="https://github.com/astral-sh/python-build-standalone/releases/download/20250409/cpython-3.11.12+20250409-x86_64-unknown-linux-gnu-install_only.tar.gz" PIP_PATH="portable_env/bin/python -m pip" PACKAGES_PATH="portable_env/lib/python3.11/site-packages" - ZIP_CMD="zip -r" rm start_macos.sh start_windows.bat fi @@ -132,7 +136,7 @@ jobs: echo "Downloading Python for $PLATFORM..." curl -L -o python-build.tar.gz "$PYTHON_URL" tar -xzf python-build.tar.gz - mv python text-generation-webui/portable_env + mv python "text-generation-webui-${VERSION_CLEAN}/portable_env" # 3. Prepare requirements file based on AVX and CUDA if [[ "$AVX_SUPPORT" == "AVX2" ]]; then @@ -142,7 +146,7 @@ jobs: fi # Create CUDA-specific requirements file if needed - cd text-generation-webui + cd "text-generation-webui-${VERSION_CLEAN}" if [[ "$CUDA_VERSION" == "11.7" ]]; then echo "Creating CUDA 11.7 specific requirements file" sed 's/cu124/cu117/g' "$BASE_REQ_FILE" > requirements_cuda_temp.txt @@ -162,14 +166,13 @@ jobs: # 6. Create ZIP file cd .. - VERSION_CLEAN="${VERSION#v}" ZIP_NAME="textgen-portable-${VERSION_CLEAN}-${PLATFORM}-cuda${CUDA_VERSION}.zip" echo "Creating archive: $ZIP_NAME" if [[ "$RUNNER_OS" == "Windows" ]]; then - powershell -Command "Compress-Archive -Path text-generation-webui -DestinationPath $ZIP_NAME" + powershell -Command "Compress-Archive -Path text-generation-webui-${VERSION_CLEAN} -DestinationPath $ZIP_NAME" else - zip -r "$ZIP_NAME" text-generation-webui + zip -r "$ZIP_NAME" "text-generation-webui-${VERSION_CLEAN}" fi - name: Upload files to a GitHub release diff --git a/.github/workflows/build-portable-release-vulkan.yml b/.github/workflows/build-portable-release-vulkan.yml index 4e88d4d9..b6217164 100644 --- a/.github/workflows/build-portable-release-vulkan.yml +++ b/.github/workflows/build-portable-release-vulkan.yml @@ -100,7 +100,13 @@ jobs: - name: Build Package shell: bash run: | - rm -rf .git cmd* update_wizard* Colab-TextGen-GPU.ipynb docker + VERSION_CLEAN="${{ inputs.version }}" + VERSION_CLEAN="${VERSION_CLEAN#v}" + cd .. + cp -r text-generation-webui "text-generation-webui-${VERSION_CLEAN}" + cd "text-generation-webui-${VERSION_CLEAN}" + + rm -rf .git cmd* update_wizard* Colab-TextGen-GPU.ipynb docker setup.cfg allowed=("character_bias" "gallery" "openai" "sd_api_pictures") find extensions/ -mindepth 1 -maxdepth 1 -type d | grep -v -E "$(printf '%s|' "${allowed[@]}" | sed 's/|$//')" | xargs rm -rf @@ -114,14 +120,12 @@ jobs: PYTHON_URL="https://github.com/astral-sh/python-build-standalone/releases/download/20250409/cpython-3.11.12+20250409-x86_64-pc-windows-msvc-install_only.tar.gz" PIP_PATH="portable_env/python.exe -m pip" PACKAGES_PATH="portable_env/Lib/site-packages" - ZIP_CMD="powershell -Command \"Compress-Archive -Path text-generation-webui -DestinationPath" rm start_linux.sh start_macos.sh else PLATFORM="linux" PYTHON_URL="https://github.com/astral-sh/python-build-standalone/releases/download/20250409/cpython-3.11.12+20250409-x86_64-unknown-linux-gnu-install_only.tar.gz" PIP_PATH="portable_env/bin/python -m pip" PACKAGES_PATH="portable_env/lib/python3.11/site-packages" - ZIP_CMD="zip -r" rm start_macos.sh start_windows.bat fi @@ -130,7 +134,7 @@ jobs: echo "Downloading Python for $PLATFORM..." curl -L -o python-build.tar.gz "$PYTHON_URL" tar -xzf python-build.tar.gz - mv python text-generation-webui/portable_env + mv python "text-generation-webui-${VERSION_CLEAN}/portable_env" # 3. Prepare requirements file based on AVX if [[ "$AVX_SUPPORT" == "AVX2" ]]; then @@ -140,7 +144,7 @@ jobs: fi REQ_FILE="$BASE_REQ_FILE" - cd text-generation-webui + cd "text-generation-webui-${VERSION_CLEAN}" # 4. Install packages echo "Installing Python packages from $REQ_FILE..." @@ -148,14 +152,13 @@ jobs: # 6. Create ZIP file cd .. - VERSION_CLEAN="${VERSION#v}" ZIP_NAME="textgen-portable-${VERSION_CLEAN}-${PLATFORM}-vulkan.zip" echo "Creating archive: $ZIP_NAME" if [[ "$RUNNER_OS" == "Windows" ]]; then - powershell -Command "Compress-Archive -Path text-generation-webui -DestinationPath $ZIP_NAME" + powershell -Command "Compress-Archive -Path text-generation-webui-${VERSION_CLEAN} -DestinationPath $ZIP_NAME" else - zip -r "$ZIP_NAME" text-generation-webui + zip -r "$ZIP_NAME" "text-generation-webui-${VERSION_CLEAN}" fi - name: Upload files to a GitHub release diff --git a/.github/workflows/build-portable-release.yml b/.github/workflows/build-portable-release.yml index 6910ce2c..dd86f522 100644 --- a/.github/workflows/build-portable-release.yml +++ b/.github/workflows/build-portable-release.yml @@ -100,7 +100,13 @@ jobs: - name: Build Package shell: bash run: | - rm -rf .git cmd* update_wizard* Colab-TextGen-GPU.ipynb docker + VERSION_CLEAN="${{ inputs.version }}" + VERSION_CLEAN="${VERSION_CLEAN#v}" + cd .. + cp -r text-generation-webui "text-generation-webui-${VERSION_CLEAN}" + cd "text-generation-webui-${VERSION_CLEAN}" + + rm -rf .git cmd* update_wizard* Colab-TextGen-GPU.ipynb docker setup.cfg allowed=("character_bias" "gallery" "openai" "sd_api_pictures") find extensions/ -mindepth 1 -maxdepth 1 -type d | grep -v -E "$(printf '%s|' "${allowed[@]}" | sed 's/|$//')" | xargs rm -rf @@ -143,10 +149,10 @@ jobs: cd .. curl -L -o python-build.tar.gz "$PYTHON_URL" tar -xzf python-build.tar.gz - mv python text-generation-webui/portable_env + mv python "text-generation-webui-${VERSION_CLEAN}/portable_env" # 3. Prepare requirements file based on platform and AVX - cd text-generation-webui + cd "text-generation-webui-${VERSION_CLEAN}" # Select requirements file based on platform if [[ "$RUNNER_OS" == "macOS" ]]; then @@ -172,14 +178,13 @@ jobs: # 5. Create ZIP file cd .. - VERSION_CLEAN="${VERSION#v}" ZIP_NAME="textgen-portable-${VERSION_CLEAN}-${PLATFORM}.zip" echo "Creating archive: $ZIP_NAME" if [[ "$RUNNER_OS" == "Windows" ]]; then - powershell -Command "Compress-Archive -Path text-generation-webui -DestinationPath $ZIP_NAME" + powershell -Command "Compress-Archive -Path text-generation-webui-${VERSION_CLEAN} -DestinationPath $ZIP_NAME" else - zip -r "$ZIP_NAME" text-generation-webui + zip -r "$ZIP_NAME" "text-generation-webui-${VERSION_CLEAN}" fi - name: Upload files to a GitHub release