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