mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-03-29 15:31:37 +00:00
updated release pipeline
This commit is contained in:
parent
9ef82fb147
commit
e6e966d47d
53
.github/workflows/build-and-release.yml
vendored
53
.github/workflows/build-and-release.yml
vendored
@ -2,7 +2,7 @@ name: Build and Release
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- "**"
|
||||||
tags:
|
tags:
|
||||||
- "v*.*.*"
|
- "v*.*.*"
|
||||||
|
|
||||||
@ -89,37 +89,37 @@ jobs:
|
|||||||
rust_target: 'aarch64-apple-darwin'
|
rust_target: 'aarch64-apple-darwin'
|
||||||
dotnet_runtime: 'osx-arm64'
|
dotnet_runtime: 'osx-arm64'
|
||||||
dotnet_name_postfix: '-aarch64-apple-darwin'
|
dotnet_name_postfix: '-aarch64-apple-darwin'
|
||||||
tauri_bundle: 'dmg updater'
|
tauri_bundle: 'dmg'
|
||||||
|
|
||||||
- platform: 'macos-latest' # for Intel-based macOS
|
- platform: 'macos-latest' # for Intel-based macOS
|
||||||
rust_target: 'x86_64-apple-darwin'
|
rust_target: 'x86_64-apple-darwin'
|
||||||
dotnet_runtime: 'osx-x64'
|
dotnet_runtime: 'osx-x64'
|
||||||
dotnet_name_postfix: '-x86_64-apple-darwin'
|
dotnet_name_postfix: '-x86_64-apple-darwin'
|
||||||
tauri_bundle: 'dmg updater'
|
tauri_bundle: 'dmg'
|
||||||
|
|
||||||
- platform: 'ubuntu-22.04' # for x86-based Linux
|
- platform: 'ubuntu-22.04' # for x86-based Linux
|
||||||
rust_target: 'x86_64-unknown-linux-gnu'
|
rust_target: 'x86_64-unknown-linux-gnu'
|
||||||
dotnet_runtime: 'linux-x64'
|
dotnet_runtime: 'linux-x64'
|
||||||
dotnet_name_postfix: '-x86_64-unknown-linux-gnu'
|
dotnet_name_postfix: '-x86_64-unknown-linux-gnu'
|
||||||
tauri_bundle: 'appimage deb updater'
|
tauri_bundle: 'appimage deb'
|
||||||
|
|
||||||
- platform: 'ubuntu-22.04-arm' # for ARM-based Linux
|
- platform: 'ubuntu-22.04-arm' # for ARM-based Linux
|
||||||
rust_target: 'aarch64-unknown-linux-gnu'
|
rust_target: 'aarch64-unknown-linux-gnu'
|
||||||
dotnet_runtime: 'linux-arm64'
|
dotnet_runtime: 'linux-arm64'
|
||||||
dotnet_name_postfix: '-aarch64-unknown-linux-gnu'
|
dotnet_name_postfix: '-aarch64-unknown-linux-gnu'
|
||||||
tauri_bundle: 'appimage deb updater'
|
tauri_bundle: 'appimage deb'
|
||||||
|
|
||||||
- platform: 'windows-latest' # for x86-based Windows
|
- platform: 'windows-latest' # for x86-based Windows
|
||||||
rust_target: 'x86_64-pc-windows-msvc'
|
rust_target: 'x86_64-pc-windows-msvc'
|
||||||
dotnet_runtime: 'win-x64'
|
dotnet_runtime: 'win-x64'
|
||||||
dotnet_name_postfix: '-x86_64-pc-windows-msvc.exe'
|
dotnet_name_postfix: '-x86_64-pc-windows-msvc.exe'
|
||||||
tauri_bundle: 'nsis updater'
|
tauri_bundle: 'nsis'
|
||||||
|
|
||||||
- platform: 'windows-latest' # for ARM-based Windows
|
- platform: 'windows-latest' # for ARM-based Windows
|
||||||
rust_target: 'aarch64-pc-windows-msvc'
|
rust_target: 'aarch64-pc-windows-msvc'
|
||||||
dotnet_runtime: 'win-arm64'
|
dotnet_runtime: 'win-arm64'
|
||||||
dotnet_name_postfix: '-aarch64-pc-windows-msvc.exe'
|
dotnet_name_postfix: '-aarch64-pc-windows-msvc.exe'
|
||||||
tauri_bundle: 'nsis updater'
|
tauri_bundle: 'nsis'
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
@ -567,30 +567,31 @@ jobs:
|
|||||||
if: matrix.platform == 'ubuntu-22.04' && contains(matrix.rust_target, 'x86_64')
|
if: matrix.platform == 'ubuntu-22.04' && contains(matrix.rust_target, 'x86_64')
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libfuse2
|
sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf libfuse2
|
||||||
|
|
||||||
- name: Setup dependencies (Ubuntu-specific, ARM)
|
- name: Setup dependencies (Ubuntu-specific, ARM)
|
||||||
if: matrix.platform == 'ubuntu-22.04-arm' && contains(matrix.rust_target, 'aarch64')
|
if: matrix.platform == 'ubuntu-22.04-arm' && contains(matrix.rust_target, 'aarch64')
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libfuse2
|
sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf libfuse2
|
||||||
|
|
||||||
- name: Setup Tauri (Unix)
|
- name: Setup Tauri (Unix)
|
||||||
if: matrix.platform != 'windows-latest'
|
if: matrix.platform != 'windows-latest'
|
||||||
run: |
|
run: |
|
||||||
if ! cargo tauri --version > /dev/null 2>&1; then
|
if ! cargo tauri --version 2>/dev/null | grep -Eq '^tauri-cli 2\.'; then
|
||||||
cargo install --version 1.6.2 tauri-cli
|
cargo install tauri-cli --version "^2.0.0" --locked --force
|
||||||
else
|
else
|
||||||
echo "Tauri is already installed"
|
echo "Tauri CLI v2 is already installed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Setup Tauri (Windows)
|
- name: Setup Tauri (Windows)
|
||||||
if: matrix.platform == 'windows-latest'
|
if: matrix.platform == 'windows-latest'
|
||||||
run: |
|
run: |
|
||||||
if (-not (cargo tauri --version 2>$null)) {
|
$tauriVersion = cargo tauri --version 2>$null
|
||||||
cargo install --version 1.6.2 tauri-cli
|
if (-not $tauriVersion -or $tauriVersion -notmatch '^tauri-cli 2\.') {
|
||||||
|
cargo install tauri-cli --version "^2.0.0" --locked --force
|
||||||
} else {
|
} else {
|
||||||
Write-Output "Tauri is already installed"
|
Write-Output "Tauri CLI v2 is already installed"
|
||||||
}
|
}
|
||||||
|
|
||||||
- name: Delete previous artifact, which may exist due to caching (macOS)
|
- name: Delete previous artifact, which may exist due to caching (macOS)
|
||||||
@ -629,8 +630,8 @@ jobs:
|
|||||||
PRIVATE_PUBLISH_KEY_PASSWORD: ${{ secrets.PRIVATE_PUBLISH_KEY_PASSWORD }}
|
PRIVATE_PUBLISH_KEY_PASSWORD: ${{ secrets.PRIVATE_PUBLISH_KEY_PASSWORD }}
|
||||||
run: |
|
run: |
|
||||||
cd runtime
|
cd runtime
|
||||||
export TAURI_PRIVATE_KEY="$PRIVATE_PUBLISH_KEY"
|
export TAURI_SIGNING_PRIVATE_KEY="$PRIVATE_PUBLISH_KEY"
|
||||||
export TAURI_KEY_PASSWORD="$PRIVATE_PUBLISH_KEY_PASSWORD"
|
export TAURI_SIGNING_PRIVATE_KEY_PASSWORD="$PRIVATE_PUBLISH_KEY_PASSWORD"
|
||||||
cargo tauri build --target ${{ matrix.rust_target }} --bundles ${{ matrix.tauri_bundle }}
|
cargo tauri build --target ${{ matrix.rust_target }} --bundles ${{ matrix.tauri_bundle }}
|
||||||
|
|
||||||
- name: Build Tauri project (Windows)
|
- name: Build Tauri project (Windows)
|
||||||
@ -640,8 +641,8 @@ jobs:
|
|||||||
PRIVATE_PUBLISH_KEY_PASSWORD: ${{ secrets.PRIVATE_PUBLISH_KEY_PASSWORD }}
|
PRIVATE_PUBLISH_KEY_PASSWORD: ${{ secrets.PRIVATE_PUBLISH_KEY_PASSWORD }}
|
||||||
run: |
|
run: |
|
||||||
cd runtime
|
cd runtime
|
||||||
$env:TAURI_PRIVATE_KEY="$env:PRIVATE_PUBLISH_KEY"
|
$env:TAURI_SIGNING_PRIVATE_KEY="$env:PRIVATE_PUBLISH_KEY"
|
||||||
$env:TAURI_KEY_PASSWORD="$env:PRIVATE_PUBLISH_KEY_PASSWORD"
|
$env:TAURI_SIGNING_PRIVATE_KEY_PASSWORD="$env:PRIVATE_PUBLISH_KEY_PASSWORD"
|
||||||
cargo tauri build --target ${{ matrix.rust_target }} --bundles ${{ matrix.tauri_bundle }}
|
cargo tauri build --target ${{ matrix.rust_target }} --bundles ${{ matrix.tauri_bundle }}
|
||||||
|
|
||||||
- name: Upload artifact (macOS)
|
- name: Upload artifact (macOS)
|
||||||
@ -729,14 +730,14 @@ jobs:
|
|||||||
# Find and process files in the artifacts directory:
|
# Find and process files in the artifacts directory:
|
||||||
find "$GITHUB_WORKSPACE/artifacts" -type f | while read -r FILE; do
|
find "$GITHUB_WORKSPACE/artifacts" -type f | while read -r FILE; do
|
||||||
|
|
||||||
if [[ "$FILE" == *"osx-x64"* && "$FILE" == *".tar.gz" ]]; then
|
if [[ "$FILE" == *"osx-x64"* && "$FILE" == *".tar.gz.sig" ]]; then
|
||||||
TARGET_NAME="MindWork AI Studio_x64.app.tar.gz"
|
|
||||||
elif [[ "$FILE" == *"osx-x64"* && "$FILE" == *".tar.gz.sig" ]]; then
|
|
||||||
TARGET_NAME="MindWork AI Studio_x64.app.tar.gz.sig"
|
TARGET_NAME="MindWork AI Studio_x64.app.tar.gz.sig"
|
||||||
elif [[ "$FILE" == *"osx-arm64"* && "$FILE" == *".tar.gz" ]]; then
|
elif [[ "$FILE" == *"osx-x64"* && "$FILE" == *".tar.gz" ]]; then
|
||||||
TARGET_NAME="MindWork AI Studio_aarch64.app.tar.gz"
|
TARGET_NAME="MindWork AI Studio_x64.app.tar.gz"
|
||||||
elif [[ "$FILE" == *"osx-arm64"* && "$FILE" == *".tar.gz.sig" ]]; then
|
elif [[ "$FILE" == *"osx-arm64"* && "$FILE" == *".tar.gz.sig" ]]; then
|
||||||
TARGET_NAME="MindWork AI Studio_aarch64.app.tar.gz.sig"
|
TARGET_NAME="MindWork AI Studio_aarch64.app.tar.gz.sig"
|
||||||
|
elif [[ "$FILE" == *"osx-arm64"* && "$FILE" == *".tar.gz" ]]; then
|
||||||
|
TARGET_NAME="MindWork AI Studio_aarch64.app.tar.gz"
|
||||||
else
|
else
|
||||||
TARGET_NAME="$(basename "$FILE")"
|
TARGET_NAME="$(basename "$FILE")"
|
||||||
TARGET_NAME=$(echo "$TARGET_NAME" | sed "s/_${VERSION}//")
|
TARGET_NAME=$(echo "$TARGET_NAME" | sed "s/_${VERSION}//")
|
||||||
@ -787,9 +788,9 @@ jobs:
|
|||||||
platform="linux-x86_64"
|
platform="linux-x86_64"
|
||||||
elif [[ "$sig_file" == *"aarch64.AppImage"* ]]; then
|
elif [[ "$sig_file" == *"aarch64.AppImage"* ]]; then
|
||||||
platform="linux-aarch64"
|
platform="linux-aarch64"
|
||||||
elif [[ "$sig_file" == *"x64-setup.nsis"* ]]; then
|
elif [[ "$sig_file" == *"x64-setup"* ]]; then
|
||||||
platform="windows-x86_64"
|
platform="windows-x86_64"
|
||||||
elif [[ "$sig_file" == *"arm64-setup.nsis"* ]]; then
|
elif [[ "$sig_file" == *"arm64-setup"* ]]; then
|
||||||
platform="windows-aarch64"
|
platform="windows-aarch64"
|
||||||
else
|
else
|
||||||
echo "Platform not recognized: '$sig_file'"
|
echo "Platform not recognized: '$sig_file'"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user