mirror of
https://github.com/fromchat-messenger/app.git
synced 2026-09-22 19:15:05 +03:00
Fix CI deprecation warnings
This commit is contained in:
@@ -0,0 +1,18 @@
|
|||||||
|
name: Cache desktop ProGuard jars
|
||||||
|
description: Restore or save the CI ProGuard export directory (speeds up release desktop-proguard job)
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
cache-hit:
|
||||||
|
description: Whether ProGuard jars were restored from cache
|
||||||
|
value: ${{ steps.cache.outputs.cache-hit }}
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- uses: actions/cache@v5
|
||||||
|
id: cache
|
||||||
|
with:
|
||||||
|
path: app/desktop/build/ci/proguard
|
||||||
|
key: desktop-proguard-v1-${{ hashFiles('gradle/libs.versions.toml', 'build.gradle.kts', 'settings.gradle.kts', 'app/desktop/build.gradle.kts', 'app/desktop/proguard-rules.pro', 'app/shared/build.gradle.kts') }}
|
||||||
|
restore-keys: |
|
||||||
|
desktop-proguard-v1-
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
name: Cache Windows installer Rust binaries
|
||||||
|
description: Restore or save compiled windows-setup release executables
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
cache-hit:
|
||||||
|
description: Whether Rust installer tools were restored from cache
|
||||||
|
value: ${{ steps.cache.outputs.cache-hit }}
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- uses: actions/cache@v5
|
||||||
|
id: cache
|
||||||
|
with:
|
||||||
|
path: app/desktop/windows-setup/target/release
|
||||||
|
key: windows-rust-tools-v1-${{ hashFiles('app/desktop/windows-setup/Cargo.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
windows-rust-tools-v1-
|
||||||
@@ -10,14 +10,14 @@ inputs:
|
|||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-java@v4
|
- uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: "17"
|
java-version: "17"
|
||||||
architecture: ${{ inputs.java-architecture }}
|
architecture: ${{ inputs.java-architecture }}
|
||||||
|
|
||||||
- uses: gradle/actions/setup-gradle@v4
|
- uses: gradle/actions/setup-gradle@v5
|
||||||
with:
|
with:
|
||||||
gradle-version: wrapper
|
gradle-version: wrapper
|
||||||
cache-read-only: false
|
cache-read-only: false
|
||||||
add-job-summary: true
|
add-job-summary: on-failure
|
||||||
|
|||||||
@@ -16,26 +16,23 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx6g -Dkotlin.daemon.jvm.options=-Xmx6g
|
GRADLE_OPTS: >-
|
||||||
|
-Dorg.gradle.jvmargs=-Xmx6g
|
||||||
|
-Dkotlin.daemon.jvm.options=-Xmx6g
|
||||||
|
-Dorg.gradle.parallel=true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
windows-x64:
|
windows-x64:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
- uses: actions/setup-java@v4
|
- uses: ./.github/actions/setup-java-gradle
|
||||||
with:
|
|
||||||
distribution: temurin
|
|
||||||
java-version: "17"
|
|
||||||
- uses: gradle/actions/setup-gradle@v4
|
|
||||||
with:
|
|
||||||
gradle-version: wrapper
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
targets: x86_64-pc-windows-msvc
|
targets: x86_64-pc-windows-msvc
|
||||||
- name: Cache Cargo
|
- name: Cache Cargo
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/registry
|
~/.cargo/registry
|
||||||
@@ -62,7 +59,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
export FROMCHAT_PACKAGING_JDK="$JAVA_HOME"
|
export FROMCHAT_PACKAGING_JDK="$JAVA_HOME"
|
||||||
./gradlew :app:desktop:packageBetaWindows -PbetaDesktop -PdesktopArch=x64 --no-daemon --console=plain
|
./gradlew :app:desktop:packageBetaWindows -PbetaDesktop -PdesktopArch=x64 --no-daemon --console=plain
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: windows-x64-installer
|
name: windows-x64-installer
|
||||||
path: app/desktop/build/distributions/release/FromChat-Setup-*-beta2.exe
|
path: app/desktop/build/distributions/release/FromChat-Setup-*-beta2.exe
|
||||||
|
|||||||
@@ -24,7 +24,10 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx6g -Dkotlin.daemon.jvm.options=-Xmx6g
|
GRADLE_OPTS: >-
|
||||||
|
-Dorg.gradle.jvmargs=-Xmx6g
|
||||||
|
-Dkotlin.daemon.jvm.options=-Xmx6g
|
||||||
|
-Dorg.gradle.parallel=true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
resolve-version:
|
resolve-version:
|
||||||
@@ -55,64 +58,57 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
FROMCHAT_PREBUILT_PROGUARD: "0"
|
FROMCHAT_PREBUILT_PROGUARD: "0"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
- uses: actions/setup-java@v4
|
- uses: ./.github/actions/setup-java-gradle
|
||||||
with:
|
|
||||||
distribution: temurin
|
|
||||||
java-version: "17"
|
|
||||||
- uses: gradle/actions/setup-gradle@v4
|
|
||||||
with:
|
|
||||||
gradle-version: wrapper
|
|
||||||
- uses: ./.github/actions/set-version
|
- uses: ./.github/actions/set-version
|
||||||
with:
|
with:
|
||||||
version: ${{ needs.resolve-version.outputs.version }}
|
version: ${{ needs.resolve-version.outputs.version }}
|
||||||
|
- uses: ./.github/actions/cache-desktop-proguard
|
||||||
|
id: proguard-cache
|
||||||
- name: Compile and ProGuard release desktop jars
|
- name: Compile and ProGuard release desktop jars
|
||||||
|
if: steps.proguard-cache.outputs.cache-hit != 'true'
|
||||||
run: ./gradlew :app:desktop:exportReleaseProguardForCi --no-daemon --console=plain
|
run: ./gradlew :app:desktop:exportReleaseProguardForCi --no-daemon --console=plain
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: desktop-proguard
|
name: desktop-proguard
|
||||||
path: app/desktop/build/ci/proguard/
|
path: app/desktop/build/ci/proguard/
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 7
|
retention-days: 3
|
||||||
|
|
||||||
windows-common:
|
windows-common:
|
||||||
needs: resolve-version
|
needs: resolve-version
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
- uses: actions/setup-java@v4
|
- uses: ./.github/actions/setup-java-gradle
|
||||||
with:
|
|
||||||
distribution: temurin
|
|
||||||
java-version: "17"
|
|
||||||
- uses: gradle/actions/setup-gradle@v4
|
|
||||||
with:
|
|
||||||
gradle-version: wrapper
|
|
||||||
- uses: ./.github/actions/set-version
|
- uses: ./.github/actions/set-version
|
||||||
with:
|
with:
|
||||||
version: ${{ needs.resolve-version.outputs.version }}
|
version: ${{ needs.resolve-version.outputs.version }}
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
targets: x86_64-pc-windows-msvc
|
targets: x86_64-pc-windows-msvc
|
||||||
- name: Cache Cargo
|
- name: Cache Cargo registry
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/registry
|
~/.cargo/registry
|
||||||
~/.cargo/git
|
~/.cargo/git
|
||||||
app/desktop/windows-setup/target
|
key: cargo-registry-${{ runner.os }}-${{ hashFiles('app/desktop/windows-setup/Cargo.lock') }}
|
||||||
key: cargo-windows-${{ runner.os }}-${{ hashFiles('app/desktop/windows-setup/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
cargo-windows-${{ runner.os }}-
|
cargo-registry-${{ runner.os }}-
|
||||||
|
- uses: ./.github/actions/cache-windows-rust-tools
|
||||||
|
id: rust-tools-cache
|
||||||
- name: Build Windows installer Rust tooling
|
- name: Build Windows installer Rust tooling
|
||||||
|
if: steps.rust-tools-cache.outputs.cache-hit != 'true'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: ./gradlew :app:desktop:buildWindowsSetupRust --no-daemon --console=plain
|
run: ./gradlew :app:desktop:buildWindowsSetupRust --no-daemon --console=plain
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: windows-rust-tools
|
name: windows-rust-tools
|
||||||
path: app/desktop/windows-setup/target/release/*.exe
|
path: app/desktop/windows-setup/target/release/*.exe
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 7
|
retention-days: 3
|
||||||
|
|
||||||
windows-package:
|
windows-package:
|
||||||
needs: [resolve-version, desktop-proguard, windows-common]
|
needs: [resolve-version, desktop-proguard, windows-common]
|
||||||
@@ -129,28 +125,27 @@ jobs:
|
|||||||
runs-on: ${{ matrix.runner }}
|
runs-on: ${{ matrix.runner }}
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
- name: Ensure ARM64 packaging JDK
|
- name: Ensure ARM64 packaging JDK
|
||||||
if: matrix.arch == 'arm64'
|
if: matrix.arch == 'arm64'
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: call scripts\ensure-windows-arm64-jdk.cmd
|
run: call scripts\ensure-windows-arm64-jdk.cmd
|
||||||
- uses: actions/setup-java@v4
|
- uses: ./.github/actions/setup-java-gradle
|
||||||
if: matrix.arch == 'x64'
|
if: matrix.arch == 'x64'
|
||||||
with:
|
- uses: gradle/actions/setup-gradle@v5
|
||||||
distribution: temurin
|
if: matrix.arch == 'arm64'
|
||||||
java-version: "17"
|
|
||||||
- uses: gradle/actions/setup-gradle@v4
|
|
||||||
with:
|
with:
|
||||||
gradle-version: wrapper
|
gradle-version: wrapper
|
||||||
|
add-job-summary: on-failure
|
||||||
- uses: ./.github/actions/set-version
|
- uses: ./.github/actions/set-version
|
||||||
with:
|
with:
|
||||||
version: ${{ needs.resolve-version.outputs.version }}
|
version: ${{ needs.resolve-version.outputs.version }}
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: desktop-proguard
|
name: desktop-proguard
|
||||||
path: app/desktop/build/prebuilt/main-release/proguard
|
path: app/desktop/build/prebuilt/main-release/proguard
|
||||||
- name: Restore Windows Rust installer tools
|
- name: Restore Windows Rust installer tools
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: windows-rust-tools
|
name: windows-rust-tools
|
||||||
path: app/desktop/windows-setup/target/release
|
path: app/desktop/windows-setup/target/release
|
||||||
@@ -170,7 +165,7 @@ jobs:
|
|||||||
args+=("-PwindowsArm64")
|
args+=("-PwindowsArm64")
|
||||||
fi
|
fi
|
||||||
./gradlew "${args[@]}"
|
./gradlew "${args[@]}"
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: windows-${{ matrix.arch }}
|
name: windows-${{ matrix.arch }}
|
||||||
path: app/desktop/build/distributions/release/*-windows-${{ matrix.arch }}.exe
|
path: app/desktop/build/distributions/release/*-windows-${{ matrix.arch }}.exe
|
||||||
@@ -189,30 +184,22 @@ jobs:
|
|||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
- uses: actions/setup-java@v4
|
- uses: ./.github/actions/setup-java-gradle
|
||||||
if: matrix.arch == 'x64'
|
if: matrix.arch == 'x64'
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
java-architecture: x64
|
||||||
java-version: "17"
|
- uses: ./.github/actions/setup-java-gradle
|
||||||
architecture: x64
|
|
||||||
- uses: actions/setup-java@v4
|
|
||||||
if: matrix.arch == 'arm64'
|
if: matrix.arch == 'arm64'
|
||||||
with:
|
|
||||||
distribution: temurin
|
|
||||||
java-version: "17"
|
|
||||||
- uses: gradle/actions/setup-gradle@v4
|
|
||||||
with:
|
|
||||||
gradle-version: wrapper
|
|
||||||
- uses: ./.github/actions/set-version
|
- uses: ./.github/actions/set-version
|
||||||
with:
|
with:
|
||||||
version: ${{ needs.resolve-version.outputs.version }}
|
version: ${{ needs.resolve-version.outputs.version }}
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: desktop-proguard
|
name: desktop-proguard
|
||||||
path: app/desktop/build/prebuilt/main-release/proguard
|
path: app/desktop/build/prebuilt/main-release/proguard
|
||||||
- name: Cache DMG background tooling
|
- name: Cache DMG background tooling
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
app/desktop/dmg-background/node_modules
|
app/desktop/dmg-background/node_modules
|
||||||
@@ -226,14 +213,14 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
DMG_DIR="app/desktop/dmg-background"
|
DMG_DIR="app/desktop/dmg-background"
|
||||||
if [[ ! -f "$DMG_DIR/node_modules/playwright/package.json" ]]; then
|
if [[ ! -f "$DMG_DIR/node_modules/playwright/package.json" ]]; then
|
||||||
npm --prefix "$DMG_DIR" install --no-fund --no-audit
|
npm --prefix "$DMG_DIR" ci --no-fund --no-audit
|
||||||
npm --prefix "$DMG_DIR" exec playwright install chromium
|
npm --prefix "$DMG_DIR" exec playwright install chromium
|
||||||
fi
|
fi
|
||||||
- name: Package macOS ${{ matrix.arch }}
|
- name: Package macOS ${{ matrix.arch }}
|
||||||
run: |
|
run: |
|
||||||
export FROMCHAT_PACKAGING_JDK="$JAVA_HOME"
|
export FROMCHAT_PACKAGING_JDK="$JAVA_HOME"
|
||||||
./gradlew :app:desktop:packageReleaseMac -PdesktopArch=${{ matrix.arch }} --no-daemon --console=plain
|
./gradlew :app:desktop:packageReleaseMac -PdesktopArch=${{ matrix.arch }} --no-daemon --console=plain
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: macos-${{ matrix.arch }}
|
name: macos-${{ matrix.arch }}
|
||||||
path: app/desktop/build/distributions/release/*-macOS-${{ matrix.arch }}.dmg
|
path: app/desktop/build/distributions/release/*-macOS-${{ matrix.arch }}.dmg
|
||||||
@@ -256,25 +243,20 @@ jobs:
|
|||||||
runs-on: ${{ matrix.runner }}
|
runs-on: ${{ matrix.runner }}
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
- uses: actions/setup-java@v4
|
- uses: ./.github/actions/setup-java-gradle
|
||||||
with:
|
|
||||||
distribution: temurin
|
|
||||||
java-version: "17"
|
|
||||||
- uses: gradle/actions/setup-gradle@v4
|
|
||||||
with:
|
|
||||||
gradle-version: wrapper
|
|
||||||
- uses: ./.github/actions/set-version
|
- uses: ./.github/actions/set-version
|
||||||
with:
|
with:
|
||||||
version: ${{ needs.resolve-version.outputs.version }}
|
version: ${{ needs.resolve-version.outputs.version }}
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: desktop-proguard
|
name: desktop-proguard
|
||||||
path: app/desktop/build/prebuilt/main-release/proguard
|
path: app/desktop/build/prebuilt/main-release/proguard
|
||||||
- name: Install Linux packaging tools
|
- name: Install Linux packaging tools
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y fakeroot rpm binutils libfuse2 wget
|
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
|
fakeroot rpm binutils libfuse2 wget
|
||||||
CACHE_DIR="${RUNNER_TOOL_CACHE}/appimagetool"
|
CACHE_DIR="${RUNNER_TOOL_CACHE}/appimagetool"
|
||||||
mkdir -p "$CACHE_DIR"
|
mkdir -p "$CACHE_DIR"
|
||||||
TOOL="$CACHE_DIR/appimagetool-${{ matrix.arch }}.AppImage"
|
TOOL="$CACHE_DIR/appimagetool-${{ matrix.arch }}.AppImage"
|
||||||
@@ -287,7 +269,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
export FROMCHAT_PACKAGING_JDK="$JAVA_HOME"
|
export FROMCHAT_PACKAGING_JDK="$JAVA_HOME"
|
||||||
./gradlew :app:desktop:packageReleaseLinux -PdesktopArch=${{ matrix.arch }} --no-daemon --console=plain
|
./gradlew :app:desktop:packageReleaseLinux -PdesktopArch=${{ matrix.arch }} --no-daemon --console=plain
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: linux-${{ matrix.arch }}
|
name: linux-${{ matrix.arch }}
|
||||||
path: |
|
path: |
|
||||||
@@ -301,20 +283,14 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
- uses: actions/setup-java@v4
|
- uses: ./.github/actions/setup-java-gradle
|
||||||
with:
|
- uses: android-actions/setup-android@v4
|
||||||
distribution: temurin
|
|
||||||
java-version: "17"
|
|
||||||
- uses: gradle/actions/setup-gradle@v4
|
|
||||||
with:
|
|
||||||
gradle-version: wrapper
|
|
||||||
- uses: android-actions/setup-android@v3
|
|
||||||
- uses: ./.github/actions/set-version
|
- uses: ./.github/actions/set-version
|
||||||
with:
|
with:
|
||||||
version: ${{ needs.resolve-version.outputs.version }}
|
version: ${{ needs.resolve-version.outputs.version }}
|
||||||
- name: Cache Android SDK extras
|
- name: Cache Android SDK extras
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.android/build-cache
|
~/.android/build-cache
|
||||||
@@ -353,7 +329,7 @@ jobs:
|
|||||||
mkdir -p release-staging
|
mkdir -p release-staging
|
||||||
APK="$(find app/android/build/outputs/apk/release -name '*release*.apk' | head -n 1)"
|
APK="$(find app/android/build/outputs/apk/release -name '*release*.apk' | head -n 1)"
|
||||||
cp "$APK" "release-staging/FromChat-${{ needs.resolve-version.outputs.version }}-android-universal.apk"
|
cp "$APK" "release-staging/FromChat-${{ needs.resolve-version.outputs.version }}-android-universal.apk"
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: android
|
name: android
|
||||||
path: release-staging/*.apk
|
path: release-staging/*.apk
|
||||||
@@ -371,8 +347,19 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
|
sparse-checkout: |
|
||||||
|
RELEASE_NOTES.md
|
||||||
|
sparse-checkout-cone-mode: false
|
||||||
|
- uses: actions/download-artifact@v5
|
||||||
|
with:
|
||||||
|
pattern: |
|
||||||
|
windows-*
|
||||||
|
macos-*
|
||||||
|
linux-*
|
||||||
|
android
|
||||||
|
merge-multiple: true
|
||||||
path: artifacts
|
path: artifacts
|
||||||
- name: Collect release assets
|
- name: Collect release assets
|
||||||
run: |
|
run: |
|
||||||
@@ -384,7 +371,7 @@ jobs:
|
|||||||
-name '*.AppImage' -o \
|
-name '*.AppImage' -o \
|
||||||
-name '*.exe' -o \
|
-name '*.exe' -o \
|
||||||
-name '*.apk' \
|
-name '*.apk' \
|
||||||
\) -exec cp {} release-assets/ \;
|
\) -exec cp -t release-assets {} +
|
||||||
ls -la release-assets
|
ls -la release-assets
|
||||||
VERSION="${{ needs.resolve-version.outputs.version }}"
|
VERSION="${{ needs.resolve-version.outputs.version }}"
|
||||||
for pattern in \
|
for pattern in \
|
||||||
@@ -405,13 +392,23 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
- name: Prepare release notes
|
||||||
|
run: |
|
||||||
|
VERSION="${{ needs.resolve-version.outputs.version }}"
|
||||||
|
{
|
||||||
|
echo "# FromChat ${VERSION}"
|
||||||
|
echo ""
|
||||||
|
cat RELEASE_NOTES.md
|
||||||
|
} > release-body.md
|
||||||
- name: Publish GitHub Release
|
- name: Publish GitHub Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ needs.resolve-version.outputs.tag }}
|
tag_name: ${{ needs.resolve-version.outputs.tag }}
|
||||||
name: FromChat ${{ needs.resolve-version.outputs.version }}
|
name: FromChat ${{ needs.resolve-version.outputs.version }}
|
||||||
|
body_path: release-body.md
|
||||||
draft: false
|
draft: false
|
||||||
generate_release_notes: true
|
prerelease: false
|
||||||
|
generate_release_notes: false
|
||||||
files: release-assets/*
|
files: release-assets/*
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
@@ -280,6 +280,3 @@ fn parse_edition(raw: &str) -> Result<FromChatEdition> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn find_app_exe(dest: &PathBuf) -> Result<PathBuf> {
|
|
||||||
find_jpackage_app_exe(dest)
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -26,6 +26,10 @@ image = { version = "0.25", default-features = false, features = ["png"] }
|
|||||||
earcutr = "0.4"
|
earcutr = "0.4"
|
||||||
raw-window-handle = "0.6"
|
raw-window-handle = "0.6"
|
||||||
|
|
||||||
|
[lints.rust]
|
||||||
|
dead_code = "allow"
|
||||||
|
unused_assignments = "warn"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
winres = "0.1"
|
winres = "0.1"
|
||||||
image = { version = "0.25", default-features = false, features = ["png"] }
|
image = { version = "0.25", default-features = false, features = ["png"] }
|
||||||
|
|||||||
@@ -7,11 +7,6 @@ pub fn ease_in_out_cubic(t: f32) -> f32 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn ease_out_cubic(t: f32) -> f32 {
|
|
||||||
let t = t.clamp(0.0, 1.0);
|
|
||||||
1.0 - (1.0 - t).powi(3)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Copy)]
|
#[derive(Clone, Copy)]
|
||||||
pub struct ScreenTransition<S: Copy> {
|
pub struct ScreenTransition<S: Copy> {
|
||||||
pub from: S,
|
pub from: S,
|
||||||
|
|||||||
@@ -399,7 +399,7 @@ impl eframe::App for SetupApp {
|
|||||||
.transition
|
.transition
|
||||||
.is_some_and(|t| t.from == Screen::Welcome || t.to == Screen::Welcome);
|
.is_some_and(|t| t.from == Screen::Welcome || t.to == Screen::Welcome);
|
||||||
|
|
||||||
ui.allocate_ui_at_rect(full, |ui| {
|
widgets::scope_at_rect(ui, full, |ui| {
|
||||||
ui.set_clip_rect(full);
|
ui.set_clip_rect(full);
|
||||||
if let Some(tr) = self.transition {
|
if let Some(tr) = self.transition {
|
||||||
let w = full.width();
|
let w = full.width();
|
||||||
@@ -412,10 +412,10 @@ impl eframe::App for SetupApp {
|
|||||||
};
|
};
|
||||||
let from = tr.from;
|
let from = tr.from;
|
||||||
let to = tr.to;
|
let to = tr.to;
|
||||||
ui.allocate_ui_at_rect(full.translate(Vec2::new(out_x, 0.0)), |ui| {
|
widgets::scope_at_rect(ui, full.translate(Vec2::new(out_x, 0.0)), |ui| {
|
||||||
self.draw_screen(ui, from, false);
|
self.draw_screen(ui, from, false);
|
||||||
});
|
});
|
||||||
ui.allocate_ui_at_rect(full.translate(Vec2::new(in_x, 0.0)), |ui| {
|
widgets::scope_at_rect(ui, full.translate(Vec2::new(in_x, 0.0)), |ui| {
|
||||||
// Hover off during slide; clicks still register.
|
// Hover off during slide; clicks still register.
|
||||||
self.draw_screen(ui, to, false);
|
self.draw_screen(ui, to, false);
|
||||||
});
|
});
|
||||||
@@ -511,7 +511,7 @@ impl SetupApp {
|
|||||||
Rect::from_min_size(Pos2::new(left, y), Vec2::new(card_w, version_h));
|
Rect::from_min_size(Pos2::new(left, y), Vec2::new(card_w, version_h));
|
||||||
|
|
||||||
if let Some(upgrade_rect) = upgrade_rect {
|
if let Some(upgrade_rect) = upgrade_rect {
|
||||||
ui.allocate_ui_at_rect(upgrade_rect, |ui| {
|
widgets::scope_at_rect(ui, upgrade_rect, |ui| {
|
||||||
ui.set_clip_rect(upgrade_rect);
|
ui.set_clip_rect(upgrade_rect);
|
||||||
if widgets::choice_card_sized(
|
if widgets::choice_card_sized(
|
||||||
ui,
|
ui,
|
||||||
@@ -525,7 +525,7 @@ impl SetupApp {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
ui.allocate_ui_at_rect(primary_rect, |ui| {
|
widgets::scope_at_rect(ui, primary_rect, |ui| {
|
||||||
ui.set_clip_rect(primary_rect);
|
ui.set_clip_rect(primary_rect);
|
||||||
if widgets::choice_card_sized(
|
if widgets::choice_card_sized(
|
||||||
ui,
|
ui,
|
||||||
@@ -542,7 +542,7 @@ impl SetupApp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
ui.allocate_ui_at_rect(portable_rect, |ui| {
|
widgets::scope_at_rect(ui, portable_rect, |ui| {
|
||||||
ui.set_clip_rect(portable_rect);
|
ui.set_clip_rect(portable_rect);
|
||||||
if widgets::choice_card_sized(
|
if widgets::choice_card_sized(
|
||||||
ui,
|
ui,
|
||||||
@@ -555,7 +555,7 @@ impl SetupApp {
|
|||||||
self.go(Screen::PortableOptions);
|
self.go(Screen::PortableOptions);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
ui.allocate_ui_at_rect(version_rect, |ui| {
|
widgets::scope_at_rect(ui, version_rect, |ui| {
|
||||||
ui.with_layout(egui::Layout::top_down(egui::Align::Center), |ui| {
|
ui.with_layout(egui::Layout::top_down(egui::Align::Center), |ui| {
|
||||||
ui.set_width(card_w);
|
ui.set_width(card_w);
|
||||||
ui.label(
|
ui.label(
|
||||||
@@ -578,7 +578,7 @@ impl SetupApp {
|
|||||||
Pos2::new(full.right(), bar_rect.top()),
|
Pos2::new(full.right(), bar_rect.top()),
|
||||||
);
|
);
|
||||||
|
|
||||||
ui.allocate_ui_at_rect(body_rect, |ui| {
|
widgets::scope_at_rect(ui, body_rect, |ui| {
|
||||||
ui.set_clip_rect(body_rect);
|
ui.set_clip_rect(body_rect);
|
||||||
ui.add_space(TITLE_BAR_HEIGHT + 4.0);
|
ui.add_space(TITLE_BAR_HEIGHT + 4.0);
|
||||||
egui::Frame::none()
|
egui::Frame::none()
|
||||||
@@ -631,7 +631,7 @@ impl SetupApp {
|
|||||||
|
|
||||||
let mut back = false;
|
let mut back = false;
|
||||||
let mut go_next = false;
|
let mut go_next = false;
|
||||||
ui.allocate_ui_at_rect(bar_rect, |ui| {
|
widgets::scope_at_rect(ui, bar_rect, |ui| {
|
||||||
ui.set_clip_rect(bar_rect);
|
ui.set_clip_rect(bar_rect);
|
||||||
ui.with_layout(egui::Layout::left_to_right(egui::Align::Center), |ui| {
|
ui.with_layout(egui::Layout::left_to_right(egui::Align::Center), |ui| {
|
||||||
egui::Frame::none()
|
egui::Frame::none()
|
||||||
@@ -671,7 +671,7 @@ impl SetupApp {
|
|||||||
Pos2::new(full.right(), bar_rect.top()),
|
Pos2::new(full.right(), bar_rect.top()),
|
||||||
);
|
);
|
||||||
|
|
||||||
ui.allocate_ui_at_rect(body_rect, |ui| {
|
widgets::scope_at_rect(ui, body_rect, |ui| {
|
||||||
ui.set_clip_rect(body_rect);
|
ui.set_clip_rect(body_rect);
|
||||||
ui.add_space(TITLE_BAR_HEIGHT + 4.0);
|
ui.add_space(TITLE_BAR_HEIGHT + 4.0);
|
||||||
egui::Frame::none()
|
egui::Frame::none()
|
||||||
@@ -707,7 +707,7 @@ impl SetupApp {
|
|||||||
|
|
||||||
let mut back = false;
|
let mut back = false;
|
||||||
let mut go_next = false;
|
let mut go_next = false;
|
||||||
ui.allocate_ui_at_rect(bar_rect, |ui| {
|
widgets::scope_at_rect(ui, bar_rect, |ui| {
|
||||||
ui.set_clip_rect(bar_rect);
|
ui.set_clip_rect(bar_rect);
|
||||||
ui.with_layout(egui::Layout::left_to_right(egui::Align::Center), |ui| {
|
ui.with_layout(egui::Layout::left_to_right(egui::Align::Center), |ui| {
|
||||||
egui::Frame::none()
|
egui::Frame::none()
|
||||||
@@ -747,7 +747,7 @@ impl SetupApp {
|
|||||||
Pos2::new(full.right(), bar_rect.top()),
|
Pos2::new(full.right(), bar_rect.top()),
|
||||||
);
|
);
|
||||||
|
|
||||||
ui.allocate_ui_at_rect(body_rect, |ui| {
|
widgets::scope_at_rect(ui, body_rect, |ui| {
|
||||||
ui.set_clip_rect(body_rect);
|
ui.set_clip_rect(body_rect);
|
||||||
ui.add_space(TITLE_BAR_HEIGHT + 4.0);
|
ui.add_space(TITLE_BAR_HEIGHT + 4.0);
|
||||||
egui::Frame::none()
|
egui::Frame::none()
|
||||||
@@ -809,7 +809,7 @@ impl SetupApp {
|
|||||||
|
|
||||||
let mut back = false;
|
let mut back = false;
|
||||||
let mut go_next = false;
|
let mut go_next = false;
|
||||||
ui.allocate_ui_at_rect(bar_rect, |ui| {
|
widgets::scope_at_rect(ui, bar_rect, |ui| {
|
||||||
ui.set_clip_rect(bar_rect);
|
ui.set_clip_rect(bar_rect);
|
||||||
ui.with_layout(egui::Layout::left_to_right(egui::Align::Center), |ui| {
|
ui.with_layout(egui::Layout::left_to_right(egui::Align::Center), |ui| {
|
||||||
egui::Frame::none()
|
egui::Frame::none()
|
||||||
@@ -872,7 +872,7 @@ impl SetupApp {
|
|||||||
);
|
);
|
||||||
let installed = self.installed.clone();
|
let installed = self.installed.clone();
|
||||||
|
|
||||||
ui.allocate_ui_at_rect(body_rect, |ui| {
|
widgets::scope_at_rect(ui, body_rect, |ui| {
|
||||||
ui.set_clip_rect(body_rect);
|
ui.set_clip_rect(body_rect);
|
||||||
ui.add_space(TITLE_BAR_HEIGHT + 4.0);
|
ui.add_space(TITLE_BAR_HEIGHT + 4.0);
|
||||||
egui::Frame::none()
|
egui::Frame::none()
|
||||||
@@ -921,7 +921,7 @@ impl SetupApp {
|
|||||||
let mut back = false;
|
let mut back = false;
|
||||||
let mut go_next = false;
|
let mut go_next = false;
|
||||||
let can_upgrade = installed.is_some();
|
let can_upgrade = installed.is_some();
|
||||||
ui.allocate_ui_at_rect(bar_rect, |ui| {
|
widgets::scope_at_rect(ui, bar_rect, |ui| {
|
||||||
ui.set_clip_rect(bar_rect);
|
ui.set_clip_rect(bar_rect);
|
||||||
ui.with_layout(egui::Layout::left_to_right(egui::Align::Center), |ui| {
|
ui.with_layout(egui::Layout::left_to_right(egui::Align::Center), |ui| {
|
||||||
egui::Frame::none()
|
egui::Frame::none()
|
||||||
@@ -1009,7 +1009,7 @@ impl SetupApp {
|
|||||||
Pos2::new(full.right(), bar_rect.top()),
|
Pos2::new(full.right(), bar_rect.top()),
|
||||||
);
|
);
|
||||||
|
|
||||||
ui.allocate_ui_at_rect(body_rect, |ui| {
|
widgets::scope_at_rect(ui, body_rect, |ui| {
|
||||||
ui.set_clip_rect(body_rect);
|
ui.set_clip_rect(body_rect);
|
||||||
ui.add_space(TITLE_BAR_HEIGHT + 4.0);
|
ui.add_space(TITLE_BAR_HEIGHT + 4.0);
|
||||||
egui::Frame::none()
|
egui::Frame::none()
|
||||||
@@ -1083,7 +1083,7 @@ impl SetupApp {
|
|||||||
});
|
});
|
||||||
|
|
||||||
let ctx = ui.ctx().clone();
|
let ctx = ui.ctx().clone();
|
||||||
ui.allocate_ui_at_rect(bar_rect, |ui| {
|
widgets::scope_at_rect(ui, bar_rect, |ui| {
|
||||||
ui.set_clip_rect(bar_rect);
|
ui.set_clip_rect(bar_rect);
|
||||||
ui.with_layout(egui::Layout::left_to_right(egui::Align::Center), |ui| {
|
ui.with_layout(egui::Layout::left_to_right(egui::Align::Center), |ui| {
|
||||||
egui::Frame::none()
|
egui::Frame::none()
|
||||||
@@ -1119,7 +1119,7 @@ impl SetupApp {
|
|||||||
Pos2::new(full.right(), bar_rect.top()),
|
Pos2::new(full.right(), bar_rect.top()),
|
||||||
);
|
);
|
||||||
|
|
||||||
ui.allocate_ui_at_rect(body_rect, |ui| {
|
widgets::scope_at_rect(ui, body_rect, |ui| {
|
||||||
ui.set_clip_rect(body_rect);
|
ui.set_clip_rect(body_rect);
|
||||||
ui.add_space(TITLE_BAR_HEIGHT + 4.0);
|
ui.add_space(TITLE_BAR_HEIGHT + 4.0);
|
||||||
egui::Frame::none()
|
egui::Frame::none()
|
||||||
@@ -1145,7 +1145,7 @@ impl SetupApp {
|
|||||||
});
|
});
|
||||||
|
|
||||||
let ctx = ui.ctx().clone();
|
let ctx = ui.ctx().clone();
|
||||||
ui.allocate_ui_at_rect(bar_rect, |ui| {
|
widgets::scope_at_rect(ui, bar_rect, |ui| {
|
||||||
ui.set_clip_rect(bar_rect);
|
ui.set_clip_rect(bar_rect);
|
||||||
ui.with_layout(egui::Layout::left_to_right(egui::Align::Center), |ui| {
|
ui.with_layout(egui::Layout::left_to_right(egui::Align::Center), |ui| {
|
||||||
egui::Frame::none()
|
egui::Frame::none()
|
||||||
@@ -1742,35 +1742,12 @@ fn run_elevated_install(
|
|||||||
let _ = tx.send(ev);
|
let _ = tx.send(ev);
|
||||||
if done {
|
if done {
|
||||||
got_terminal = true;
|
got_terminal = true;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn find_app_exe(dest: &PathBuf) -> anyhow::Result<PathBuf> {
|
|
||||||
find_jpackage_app_exe(dest).map_err(Into::into)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn walkdir_files(root: &PathBuf) -> anyhow::Result<Vec<PathBuf>> {
|
|
||||||
let mut out = Vec::new();
|
|
||||||
fn rec(dir: &PathBuf, out: &mut Vec<PathBuf>) -> anyhow::Result<()> {
|
|
||||||
for e in std::fs::read_dir(dir)? {
|
|
||||||
let e = e?;
|
|
||||||
let p = e.path();
|
|
||||||
if e.file_type()?.is_dir() {
|
|
||||||
rec(&p, out)?;
|
|
||||||
} else {
|
|
||||||
out.push(p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
rec(root, &mut out)?;
|
|
||||||
Ok(out)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn default_install_path(all_users: bool, edition: FromChatEdition) -> String {
|
fn default_install_path(all_users: bool, edition: FromChatEdition) -> String {
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,7 +15,12 @@ use crate::theme::{
|
|||||||
TEXT_BUTTON_PAD_END_WITH_ICON, TEXT_BUTTON_PAD_START_WITH_ICON, TEXT_FIELD_CORNER_RADIUS,
|
TEXT_BUTTON_PAD_END_WITH_ICON, TEXT_BUTTON_PAD_START_WITH_ICON, TEXT_FIELD_CORNER_RADIUS,
|
||||||
TEXT_FIELD_HEIGHT, TEXT_FIELD_PAD_HORIZONTAL, TEXT_FIELD_TRAILING_ICON_WIDTH,
|
TEXT_FIELD_HEIGHT, TEXT_FIELD_PAD_HORIZONTAL, TEXT_FIELD_TRAILING_ICON_WIDTH,
|
||||||
};
|
};
|
||||||
use eframe::egui::{self, Color32, Id, Pos2, Rect, Rounding, Sense, Stroke, TextureHandle, Ui, Vec2};
|
use eframe::egui::{self, Color32, Id, InnerResponse, Pos2, Rect, Rounding, Sense, Stroke, TextureHandle, Ui, UiBuilder, Vec2};
|
||||||
|
|
||||||
|
/// Lay out a child [Ui] in a fixed rectangle (replaces deprecated `allocate_ui_at_rect`).
|
||||||
|
pub fn scope_at_rect<R>(ui: &mut Ui, rect: Rect, add_contents: impl FnOnce(&mut Ui) -> R) -> InnerResponse<R> {
|
||||||
|
ui.scope_builder(UiBuilder::new().max_rect(rect), add_contents)
|
||||||
|
}
|
||||||
|
|
||||||
pub const H_PADDING: f32 = 24.0;
|
pub const H_PADDING: f32 = 24.0;
|
||||||
/// Matches [H_PADDING] so bottom / side insets stay equal.
|
/// Matches [H_PADDING] so bottom / side insets stay equal.
|
||||||
@@ -701,7 +706,7 @@ pub fn path_field(ui: &mut Ui, value: &mut String, enabled: bool, field_id: Id)
|
|||||||
paint_path_line(ui.painter(), &to_text, fade);
|
paint_path_line(ui.painter(), &to_text, fade);
|
||||||
}
|
}
|
||||||
|
|
||||||
ui.allocate_ui_at_rect(text_rect, |ui| {
|
scope_at_rect(ui, text_rect, |ui| {
|
||||||
ui.set_clip_rect(text_rect);
|
ui.set_clip_rect(text_rect);
|
||||||
ui.with_layout(
|
ui.with_layout(
|
||||||
egui::Layout::left_to_right(egui::Align::Center),
|
egui::Layout::left_to_right(egui::Align::Center),
|
||||||
@@ -726,7 +731,7 @@ pub fn path_field(ui: &mut Ui, value: &mut String, enabled: bool, field_id: Id)
|
|||||||
});
|
});
|
||||||
|
|
||||||
let mut browse = false;
|
let mut browse = false;
|
||||||
ui.allocate_ui_at_rect(icon_rect, |ui| {
|
scope_at_rect(ui, icon_rect, |ui| {
|
||||||
ui.with_layout(
|
ui.with_layout(
|
||||||
egui::Layout::centered_and_justified(egui::Direction::LeftToRight),
|
egui::Layout::centered_and_justified(egui::Direction::LeftToRight),
|
||||||
|ui| {
|
|ui| {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ mod imp {
|
|||||||
use windows::core::PCWSTR;
|
use windows::core::PCWSTR;
|
||||||
use windows::Win32::Foundation::HWND;
|
use windows::Win32::Foundation::HWND;
|
||||||
use windows::Win32::UI::WindowsAndMessaging::{
|
use windows::Win32::UI::WindowsAndMessaging::{
|
||||||
MessageBoxW, MB_DEFBUTTON2, MB_ICONERROR, MB_ICONWARNING, MB_OK, MB_YESNO, IDNO, IDYES,
|
MessageBoxW, MB_DEFBUTTON2, MB_ICONERROR, MB_ICONWARNING, MB_OK, MB_YESNO, IDYES,
|
||||||
};
|
};
|
||||||
|
|
||||||
fn wide(s: &str) -> Vec<u16> {
|
fn wide(s: &str) -> Vec<u16> {
|
||||||
|
|||||||
@@ -35,3 +35,5 @@ android.r8.optimizedResourceShrinking=true
|
|||||||
android.bundle.enableNativeLibraryCompressionInApk=true
|
android.bundle.enableNativeLibraryCompressionInApk=true
|
||||||
# Configuration cache can surface noisy IDE/sync issues on some setups; turn on when stable.
|
# Configuration cache can surface noisy IDE/sync issues on some setups; turn on when stable.
|
||||||
org.gradle.configuration-cache=false
|
org.gradle.configuration-cache=false
|
||||||
|
# Windows CI hosts cannot run iOS simulator tests; suppress KMP disabled-target noise.
|
||||||
|
kotlin.native.ignoreDisabledTargets=true
|
||||||
Reference in New Issue
Block a user