From d7e5d39f261f3971840f0d4eada261c2e7b82b95 Mon Sep 17 00:00:00 2001 From: WhereTheTimeWent Date: Sat, 18 Jan 2025 23:14:00 +0100 Subject: [PATCH] Update flutter-build.yml --- .github/workflows/flutter-build.yml | 1227 +-------------------------- 1 file changed, 6 insertions(+), 1221 deletions(-) diff --git a/.github/workflows/flutter-build.yml b/.github/workflows/flutter-build.yml index fe23f9423786..1cceb29f63e8 100644 --- a/.github/workflows/flutter-build.yml +++ b/.github/workflows/flutter-build.yml @@ -247,148 +247,6 @@ jobs: ./SignOutput/rustdesk-*.msi ./SignOutput/rustdesk-*.exe - # The fallback for the flutter version, we use Sciter for 32bit Windows. - build-for-windows-sciter: - name: ${{ matrix.job.target }} (${{ matrix.job.os }}) - runs-on: ${{ matrix.job.os }} - # Temporarily disable this action due to additional test is needed. - # if: false - strategy: - fail-fast: false - matrix: - job: - # - { target: i686-pc-windows-msvc , os: windows-2022 } - # - { target: x86_64-pc-windows-gnu , os: windows-2022 } - - { - target: i686-pc-windows-msvc, - os: windows-2022, - arch: x86, - vcpkg-triplet: x86-windows-static, - } - # - { target: aarch64-pc-windows-msvc, os: windows-2022 } - steps: - - name: Export GitHub Actions cache environment variables - uses: actions/github-script@v6 - with: - script: | - core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); - core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - - - name: Checkout source code - uses: actions/checkout@v4 - - - name: Install LLVM and Clang - uses: rustdesk-org/install-llvm-action-32bit@master - with: - version: ${{ env.LLVM_VERSION }} - - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@v1 - with: - toolchain: nightly-2023-10-13-${{ matrix.job.target }} # must use nightly here, because of abi_thiscall feature required - targets: ${{ matrix.job.target }} - components: "rustfmt" - - - uses: Swatinem/rust-cache@v2 - with: - prefix-key: ${{ matrix.job.os }}-sciter - - - name: Setup vcpkg with Github Actions binary cache - uses: lukka/run-vcpkg@v11 - with: - vcpkgDirectory: C:\vcpkg - vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }} - doNotCache: false - - - name: Install vcpkg dependencies - env: - VCPKG_DEFAULT_HOST_TRIPLET: ${{ matrix.job.vcpkg-triplet }} - run: | - if ! $VCPKG_ROOT/vcpkg \ - install \ - --triplet ${{ matrix.job.vcpkg-triplet }} \ - --x-install-root="$VCPKG_ROOT/installed"; then - find "${VCPKG_ROOT}/" -name "*.log" | while read -r _1; do - echo "$_1:" - echo "======" - cat "$_1" - echo "======" - echo "" - done - exit 1 - fi - head -n 100 "${VCPKG_ROOT}/buildtrees/ffmpeg/build-${{ matrix.job.vcpkg-triplet }}-rel-out.log" || true - shell: bash - - - name: Build rustdesk - id: build - shell: bash - run: | - python3 res/inline-sciter.py - # Patch sciter x86 - sed -i 's/branch = "dyn"/branch = "dyn_x86"/g' ./Cargo.toml - cargo build --features inline,vram,hwcodec --release --bins - mkdir -p ./Release - mv ./target/release/rustdesk.exe ./Release/rustdesk.exe - curl -LJ -o ./Release/sciter.dll https://github.com/c-smile/sciter-sdk/raw/master/bin.win/x32/sciter.dll - echo "output_folder=./Release" >> $GITHUB_OUTPUT - curl -LJ -o ./usbmmidd_v2.zip https://github.com/rustdesk-org/rdev/releases/download/usbmmidd_v2/usbmmidd_v2.zip - unzip usbmmidd_v2.zip - # Do not remove x64 files, because the user may run the 32bit version on a 64bit system. - # Do not remove ./usbmmidd_v2/deviceinstaller64.exe, as x86 exe cannot install and uninstall drivers when running on x64, - # we need the x64 exe to install and uninstall the driver. - rm -rf ./usbmmidd_v2/deviceinstaller.exe ./usbmmidd_v2/usbmmidd.bat - mv ./usbmmidd_v2 ./Release || true - - - name: find Runner.res - # Windows: find Runner.res (compiled from ./flutter/windows/runner/Runner.rc), copy to ./Runner.res - # Runner.rc does not contain actual version, but Runner.res does - continue-on-error: true - shell: bash - run: | - runner_res=$(find . -name "Runner.res"); - if [ "$runner_res" == "" ]; then - echo "Runner.res: not found"; - else - echo "Runner.res: $runner_res"; - cp $runner_res ./libs/portable/Runner.res; - echo "list ./libs/portable/Runner.res"; - ls -l ./libs/portable/Runner.res; - fi - - - name: Sign rustdesk files - if: env.UPLOAD_ARTIFACT == 'true' && env.SIGN_BASE_URL != '' - shell: bash - run: | - pip3 install requests argparse - BASE_URL=${{ secrets.SIGN_BASE_URL }} SECRET_KEY=${{ secrets.SIGN_SECRET_KEY }} python3 res/job.py sign_files ./Release/ - - - name: Build self-extracted executable - shell: bash - run: | - sed -i '/dpiAware/d' res/manifest.xml - pushd ./libs/portable - pip3 install -r requirements.txt - python3 ./generate.py -f ../../Release/ -o . -e ../../Release/rustdesk.exe - popd - mkdir -p ./SignOutput - mv ./target/release/rustdesk-portable-packer.exe ./SignOutput/rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}-sciter.exe - - - name: Sign rustdesk self-extracted file - if: env.UPLOAD_ARTIFACT == 'true' && env.SIGN_BASE_URL != '' - shell: bash - run: | - BASE_URL=${{ secrets.SIGN_BASE_URL }} SECRET_KEY=${{ secrets.SIGN_SECRET_KEY }} python3 res/job.py sign_files ./SignOutput/ - - - name: Publish Release - uses: softprops/action-gh-release@v1 - if: env.UPLOAD_ARTIFACT == 'true' - with: - prerelease: true - tag_name: ${{ env.TAG_NAME }} - files: | - ./SignOutput/rustdesk-*.exe - build-for-macOS-arm64-selfhost: # use build-for-macOS instead if: false @@ -461,178 +319,6 @@ jobs: files: | rustdesk*-aarch64.dmg - build-rustdesk-ios: - if: ${{ inputs.upload-artifact }} - name: build rustdesk ios ipa - runs-on: ${{ matrix.job.os }} - needs: [generate-bridge] - strategy: - fail-fast: false - matrix: - job: - - { - arch: aarch64, - target: aarch64-apple-ios, - os: macos-13, - vcpkg-triplet: arm64-ios, - } - steps: - - name: Export GitHub Actions cache environment variables - uses: actions/github-script@v6 - with: - script: | - core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); - core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - - - name: Install dependencies - run: | - brew install nasm yasm - - name: Checkout source code - uses: actions/checkout@v4 - - name: Install flutter - uses: subosito/flutter-action@v2 - with: - channel: "stable" - flutter-version: ${{ env.FLUTTER_VERSION }} - - - name: Patch flutter - run: | - cd $(dirname $(dirname $(which flutter))) - [[ "3.24.5" == ${{env.FLUTTER_VERSION}} ]] && git apply ${{ github.workspace }}/.github/patches/flutter_3.24.4_dropdown_menu_enableFilter.diff - - - name: Setup vcpkg with Github Actions binary cache - uses: lukka/run-vcpkg@v11 - with: - vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }} - doNotCache: false - - - name: Install vcpkg dependencies - run: | - if ! $VCPKG_ROOT/vcpkg \ - install \ - --triplet ${{ matrix.job.vcpkg-triplet }} \ - --x-install-root="$VCPKG_ROOT/installed"; then - find "${VCPKG_ROOT}/" -name "*.log" | while read -r _1; do - echo "$_1:" - echo "======" - cat "$_1" - echo "======" - echo "" - done - exit 1 - fi - head -n 100 "${VCPKG_ROOT}/buildtrees/ffmpeg/build-${{ matrix.job.vcpkg-triplet }}-rel-out.log" || true - shell: bash - - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@v1 - with: - toolchain: ${{ env.RUST_VERSION }} - targets: ${{ matrix.job.target }} - components: "rustfmt" - - - uses: Swatinem/rust-cache@v2 - with: - prefix-key: rustdesk-lib-cache-ios - key: ${{ matrix.job.target }} - - - name: Restore bridge files - uses: actions/download-artifact@master - with: - name: bridge-artifact - path: ./ - - - name: Build rustdesk lib - run: | - rustup target add ${{ matrix.job.target }} - cargo build --features flutter,hwcodec --release --target aarch64-apple-ios --lib - - - name: Upload liblibrustdesk.a Artifacts - uses: actions/upload-artifact@master - with: - name: liblibrustdesk.a - path: target/aarch64-apple-ios/release/liblibrustdesk.a - - - name: Build rustdesk - shell: bash - run: | - pushd flutter - # flutter build ipa --release --obfuscate --split-debug-info=./split-debug-info --no-codesign - # for easy debugging - flutter build ipa --release --no-codesign - - # - name: Upload Artifacts - # # if: env.ANDROID_SIGNING_KEY != null && env.UPLOAD_ARTIFACT == 'true' - # uses: actions/upload-artifact@master - # with: - # name: rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.apk - # path: flutter/build/ios/ipa/*.ipa - - # - name: Publish ipa package - # # if: env.ANDROID_SIGNING_KEY != null && env.UPLOAD_ARTIFACT == 'true' - # uses: softprops/action-gh-release@v1 - # with: - # prerelease: true - # tag_name: ${{ env.TAG_NAME }} - # files: | - # flutter/build/ios/ipa/*.ipa - - build-rustdesk-ios-selfhost: - #if: ${{ inputs.upload-artifact }} - if: false - runs-on: [self-hosted, macOS, ARM64] - needs: [generate-bridge] - strategy: - fail-fast: false - steps: - - name: Export GitHub Actions cache environment variables - uses: actions/github-script@v6 - with: - script: | - core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); - core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - - - name: Checkout source code - uses: actions/checkout@v4 - - # $VCPKG_ROOT/vcpkg install --triplet arm64-ios --x-install-root="$VCPKG_ROOT/installed" - - - name: Restore bridge files - uses: actions/download-artifact@master - with: - name: bridge-artifact - path: ./ - - - name: Build rustdesk lib - run: | - cargo build --features flutter,hwcodec --release --target aarch64-apple-ios --lib - - - name: Build rustdesk - # ios sdk not installed on this machine, I will install it later after I am back home - if: false - shell: bash - run: | - pushd flutter - # flutter build ipa --release --obfuscate --split-debug-info=./split-debug-info --no-codesign - # for easy debugging - flutter build ipa --release --no-codesign - - # - name: Upload Artifacts - # # if: env.ANDROID_SIGNING_KEY != null && env.UPLOAD_ARTIFACT == 'true' - # uses: actions/upload-artifact@master - # with: - # name: rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.apk - # path: flutter/build/ios/ipa/*.ipa - - # - name: Publish ipa package - # # if: env.ANDROID_SIGNING_KEY != null && env.UPLOAD_ARTIFACT == 'true' - # uses: softprops/action-gh-release@v1 - # with: - # prerelease: true - # tag_name: ${{ env.TAG_NAME }} - # files: | - # flutter/build/ios/ipa/*.ipa - build-for-macOS: name: ${{ matrix.job.target }} runs-on: ${{ matrix.job.os }} @@ -863,500 +549,16 @@ jobs: name: rustdesk-unsigned-windows-x86_64 path: ./windows-x86_64/ - - name: Combine unsigned app - run: | - tar czf rustdesk-${{ env.VERSION }}-unsigned.tar.gz *.dmg windows-x86_64 - - - name: Publish unsigned app - uses: softprops/action-gh-release@v1 - with: - prerelease: true - tag_name: ${{ env.TAG_NAME }} - files: rustdesk-${{ env.VERSION }}-unsigned.tar.gz - - build-rustdesk-android: - needs: [generate-bridge] - name: build rustdesk android apk ${{ matrix.job.target }} - runs-on: ${{ matrix.job.os }} - strategy: - fail-fast: false - matrix: - job: - - { - arch: aarch64, - target: aarch64-linux-android, - os: ubuntu-20.04, - reltype: release, - suffix: "", - } - - { - arch: armv7, - target: armv7-linux-androideabi, - os: ubuntu-20.04, - reltype: release, - suffix: "", - } - - { - arch: x86_64, - target: x86_64-linux-android, - os: ubuntu-20.04, - reltype: release, - suffix: "", - } - steps: - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main - with: - tool-cache: false - android: false - dotnet: true - haskell: true - large-packages: false - docker-images: true - swap-storage: false - - - name: Export GitHub Actions cache environment variables - uses: actions/github-script@v6 - with: - script: | - core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); - core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y \ - clang \ - cmake \ - curl \ - gcc-multilib \ - git \ - g++ \ - g++-multilib \ - libayatana-appindicator3-dev \ - libasound2-dev \ - libc6-dev \ - libclang-10-dev \ - libgstreamer1.0-dev \ - libgstreamer-plugins-base1.0-dev \ - libgtk-3-dev \ - libpam0g-dev \ - libpulse-dev \ - libva-dev \ - libxcb-randr0-dev \ - libxcb-shape0-dev \ - libxcb-xfixes0-dev \ - libxdo-dev \ - libxfixes-dev \ - llvm-10-dev \ - nasm \ - ninja-build \ - openjdk-17-jdk-headless \ - pkg-config \ - tree \ - wget - - - name: Checkout source code - uses: actions/checkout@v4 - - name: Install flutter - uses: subosito/flutter-action@v2 - with: - channel: "stable" - flutter-version: ${{ env.ANDROID_FLUTTER_VERSION }} - - - name: Patch flutter - run: | - cd $(dirname $(dirname $(which flutter))) - [[ "3.24.5" == ${{env.ANDROID_FLUTTER_VERSION}} ]] && git apply ${{ github.workspace }}/.github/patches/flutter_3.24.4_dropdown_menu_enableFilter.diff - - - uses: nttld/setup-ndk@v1 - id: setup-ndk - with: - ndk-version: ${{ env.NDK_VERSION }} - add-to-path: true - - - name: Setup vcpkg with Github Actions binary cache - uses: lukka/run-vcpkg@v11 - with: - vcpkgDirectory: /opt/artifacts/vcpkg - vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }} - doNotCache: false - - - name: Install vcpkg dependencies - run: | - case ${{ matrix.job.target }} in - aarch64-linux-android) - ANDROID_TARGET=arm64-v8a - ;; - armv7-linux-androideabi) - ANDROID_TARGET=armeabi-v7a - ;; - x86_64-linux-android) - ANDROID_TARGET=x86_64 - ;; - i686-linux-android) - ANDROID_TARGET=x86 - ;; - esac - if ! ./flutter/build_android_deps.sh "${ANDROID_TARGET}"; then - find "${VCPKG_ROOT}/" -name "*.log" | while read -r _1; do - echo "$_1:" - echo "======" - cat "$_1" - echo "======" - echo "" - done - exit 1 - fi - shell: bash - - - name: Restore bridge files - uses: actions/download-artifact@master - with: - name: bridge-artifact - path: ./ - - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@v1 - with: - toolchain: ${{ env.RUST_VERSION }} - components: "rustfmt" - - - uses: Swatinem/rust-cache@v2 - with: - prefix-key: rustdesk-lib-cache-android # TODO: drop '-android' part after caches are invalidated - key: ${{ matrix.job.target }} - - - name: fix android for flutter 3.13 - if: ${{ env.ANDROID_FLUTTER_VERSION == '3.13.9' }} - run: | - cd flutter - sed -i 's/uni_links_desktop/#uni_links_desktop/g' pubspec.yaml - sed -i 's/extended_text: .*/extended_text: 11.1.0/' pubspec.yaml - flutter pub get - cd lib - find . | grep dart | xargs sed -i 's/textScaler: TextScaler.linear(\(.*\)),/textScaleFactor: \1,/g' - - - name: Build rustdesk lib - env: - ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} - ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }} - run: | - rustup target add ${{ matrix.job.target }} - cargo install cargo-ndk --version ${{ env.CARGO_NDK_VERSION }} --locked - case ${{ matrix.job.target }} in - aarch64-linux-android) - ./flutter/ndk_arm64.sh - mkdir -p ./flutter/android/app/src/main/jniLibs/arm64-v8a - cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/arm64-v8a/librustdesk.so - ;; - armv7-linux-androideabi) - ./flutter/ndk_arm.sh - mkdir -p ./flutter/android/app/src/main/jniLibs/armeabi-v7a - cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/armeabi-v7a/librustdesk.so - ;; - x86_64-linux-android) - ./flutter/ndk_x64.sh - mkdir -p ./flutter/android/app/src/main/jniLibs/x86_64 - cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/x86_64/librustdesk.so - ;; - i686-linux-android) - ./flutter/ndk_x86.sh - mkdir -p ./flutter/android/app/src/main/jniLibs/x86 - cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/x86/librustdesk.so - ;; - esac - - - name: Upload Rustdesk library to Artifacts - uses: actions/upload-artifact@master - with: - name: librustdesk.so.${{ matrix.job.target }} - path: ./target/${{ matrix.job.target }}/release/liblibrustdesk.so - - - name: Build rustdesk - shell: bash - env: - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - run: | - export PATH=/usr/lib/jvm/java-17-openjdk-amd64/bin:$PATH - # temporary use debug sign config - sed -i "s/signingConfigs.release/signingConfigs.debug/g" ./flutter/android/app/build.gradle - case ${{ matrix.job.target }} in - aarch64-linux-android) - mkdir -p ./flutter/android/app/src/main/jniLibs/arm64-v8a - cp ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/libc++_shared.so ./flutter/android/app/src/main/jniLibs/arm64-v8a/ - cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/arm64-v8a/librustdesk.so - # build flutter - pushd flutter - flutter build apk "--${{ matrix.job.reltype }}" --target-platform android-arm64 --split-per-abi - mv build/app/outputs/flutter-apk/app-arm64-v8a-${{ matrix.job.reltype }}.apk ../rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}${{ matrix.job.suffix }}.apk - ;; - armv7-linux-androideabi) - mkdir -p ./flutter/android/app/src/main/jniLibs/armeabi-v7a - cp ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/libc++_shared.so ./flutter/android/app/src/main/jniLibs/armeabi-v7a/ - cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/armeabi-v7a/librustdesk.so - # build flutter - pushd flutter - flutter build apk "--${{ matrix.job.reltype }}" --target-platform android-arm --split-per-abi - mv build/app/outputs/flutter-apk/app-armeabi-v7a-${{ matrix.job.reltype }}.apk ../rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}${{ matrix.job.suffix }}.apk - ;; - x86_64-linux-android) - mkdir -p ./flutter/android/app/src/main/jniLibs/x86_64 - cp ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/libc++_shared.so ./flutter/android/app/src/main/jniLibs/x86_64/ - cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/x86_64/librustdesk.so - # build flutter - pushd flutter - flutter build apk "--${{ matrix.job.reltype }}" --target-platform android-x64 --split-per-abi - mv build/app/outputs/flutter-apk/app-x86_64-${{ matrix.job.reltype }}.apk ../rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}${{ matrix.job.suffix }}.apk - ;; - i686-linux-android) - mkdir -p ./flutter/android/app/src/main/jniLibs/x86 - cp ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/i686-linux-android/libc++_shared.so ./flutter/android/app/src/main/jniLibs/x86/ - cp ./target/${{ matrix.job.target }}/release/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/x86/librustdesk.so - # build flutter - pushd flutter - flutter build apk "--${{ matrix.job.reltype }}" --target-platform android-x86 --split-per-abi - mv build/app/outputs/flutter-apk/app-x86-${{ matrix.job.reltype }}.apk ../rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}${{ matrix.job.suffix }}.apk - ;; - esac - popd - mkdir -p signed-apk; pushd signed-apk - mv ../rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}${{ matrix.job.suffix }}.apk . - - # https://github.com/r0adkll/sign-android-release/issues/84#issuecomment-1889636075 - - name: Setup sign tool version variable - shell: bash - run: | - BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1) - echo "ANDROID_SIGN_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV - echo Last build tool version is: $BUILD_TOOL_VERSION - - - uses: r0adkll/sign-android-release@v1 - name: Sign app APK - if: env.ANDROID_SIGNING_KEY != null - id: sign-rustdesk - with: - releaseDirectory: ./signed-apk - signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }} - alias: ${{ secrets.ANDROID_ALIAS }} - keyStorePassword: ${{ secrets.ANDROID_KEY_STORE_PASSWORD }} - keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }} - env: - # env.ANDROID_SIGN_TOOL_VERSION is set by Step "Setup sign tool version variable" - BUILD_TOOLS_VERSION: ${{ env.ANDROID_SIGN_TOOL_VERSION }} - - - name: Upload Artifacts - if: env.ANDROID_SIGNING_KEY != null && env.UPLOAD_ARTIFACT == 'true' - uses: actions/upload-artifact@master - with: - name: rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.apk - path: ${{steps.sign-rustdesk.outputs.signedReleaseFile}} - - - name: Publish signed apk package - if: env.ANDROID_SIGNING_KEY != null && env.UPLOAD_ARTIFACT == 'true' - uses: softprops/action-gh-release@v1 - with: - prerelease: true - tag_name: ${{ env.TAG_NAME }} - files: | - ${{steps.sign-rustdesk.outputs.signedReleaseFile}} - - - name: Publish unsigned apk package - if: env.ANDROID_SIGNING_KEY == null && env.UPLOAD_ARTIFACT == 'true' - uses: softprops/action-gh-release@v1 - with: - prerelease: true - tag_name: ${{ env.TAG_NAME }} - files: | - signed-apk/rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.apk - - build-rustdesk-android-universal: - needs: [build-rustdesk-android] - name: build rustdesk android universal apk - if: ${{ inputs.upload-artifact }} - runs-on: ubuntu-20.04 - env: - reltype: release - x86_target: "" # can be ",android-x86" - suffix: "" - steps: - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main - with: - tool-cache: false - android: false - dotnet: true - haskell: true - large-packages: false - docker-images: true - swap-storage: false - - - name: Export GitHub Actions cache environment variables - uses: actions/github-script@v6 - with: - script: | - core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); - core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y \ - clang \ - cmake \ - curl \ - gcc-multilib \ - git \ - g++ \ - g++-multilib \ - libayatana-appindicator3-dev \ - libasound2-dev \ - libc6-dev \ - libclang-10-dev \ - libgstreamer1.0-dev \ - libgstreamer-plugins-base1.0-dev \ - libgtk-3-dev \ - libpam0g-dev \ - libpulse-dev \ - libva-dev \ - libxcb-randr0-dev \ - libxcb-shape0-dev \ - libxcb-xfixes0-dev \ - libxdo-dev \ - libxfixes-dev \ - llvm-10-dev \ - nasm \ - ninja-build \ - openjdk-17-jdk-headless \ - pkg-config \ - tree \ - wget - - - name: Checkout source code - uses: actions/checkout@v4 - - name: Install flutter - uses: subosito/flutter-action@v2 - with: - channel: "stable" - flutter-version: ${{ env.ANDROID_FLUTTER_VERSION }} - - - name: Patch flutter - run: | - cd $(dirname $(dirname $(which flutter))) - [[ "3.24.5" == ${{env.ANDROID_FLUTTER_VERSION}} ]] && git apply ${{ github.workspace }}/.github/patches/flutter_3.24.4_dropdown_menu_enableFilter.diff - - - name: Restore bridge files - uses: actions/download-artifact@master - with: - name: bridge-artifact - path: ./ - - - name: Download Rustdesk library from Artifacts - uses: actions/download-artifact@master - with: - name: librustdesk.so.aarch64-linux-android - path: ./flutter/android/app/src/main/jniLibs/arm64-v8a - - - name: Download Rustdesk library from Artifacts - uses: actions/download-artifact@master - with: - name: librustdesk.so.armv7-linux-androideabi - path: ./flutter/android/app/src/main/jniLibs/armeabi-v7a - - - name: Download Rustdesk library from Artifacts - uses: actions/download-artifact@master - with: - name: librustdesk.so.x86_64-linux-android - path: ./flutter/android/app/src/main/jniLibs/x86_64 - - - name: Download Rustdesk library from Artifacts - if: ${{ env.reltype == 'debug' }} - uses: actions/download-artifact@master - with: - name: librustdesk.so.i686-linux-android - path: ./flutter/android/app/src/main/jniLibs/x86 - - - name: fix android for flutter 3.13 - if: ${{ env.ANDROID_FLUTTER_VERSION == '3.13.9' }} - run: | - cd flutter - sed -i 's/uni_links_desktop/#uni_links_desktop/g' pubspec.yaml - sed -i 's/extended_text: .*/extended_text: 11.1.0/' pubspec.yaml - flutter pub get - cd lib - find . | grep dart | xargs sed -i 's/textScaler: TextScaler.linear(\(.*\)),/textScaleFactor: \1,/g' - - - name: Build rustdesk - shell: bash - env: - JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64 - run: | - export PATH=/usr/lib/jvm/java-17-openjdk-amd64/bin:$PATH - # temporary use debug sign config - sed -i "s/signingConfigs.release/signingConfigs.debug/g" ./flutter/android/app/build.gradle - mv ./flutter/android/app/src/main/jniLibs/arm64-v8a/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/arm64-v8a/librustdesk.so - cp ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/libc++_shared.so ./flutter/android/app/src/main/jniLibs/arm64-v8a/ - mv ./flutter/android/app/src/main/jniLibs/armeabi-v7a/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/armeabi-v7a/librustdesk.so - cp ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/libc++_shared.so ./flutter/android/app/src/main/jniLibs/armeabi-v7a/ - mv ./flutter/android/app/src/main/jniLibs/x86_64/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/x86_64/librustdesk.so - cp ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/libc++_shared.so ./flutter/android/app/src/main/jniLibs/x86_64/ - if [ "${{ env.reltype }}" = "debug" ]; then - mv ./flutter/android/app/src/main/jniLibs/x86/liblibrustdesk.so ./flutter/android/app/src/main/jniLibs/x86/librustdesk.so - cp ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/i686-linux-android/libc++_shared.so ./flutter/android/app/src/main/jniLibs/x86/ - fi - # build flutter - pushd flutter - flutter build apk "--${{ env.reltype }}" --target-platform android-arm64,android-arm,android-x64${{ env.x86_target }} - popd - mkdir -p signed-apk - mv ./flutter/build/app/outputs/flutter-apk/app-${{ env.reltype }}.apk signed-apk/rustdesk-${{ env.VERSION }}-universal${{ env.suffix }}.apk - - # https://github.com/r0adkll/sign-android-release/issues/84#issuecomment-1889636075 - - name: Setup sign tool version variable - shell: bash - run: | - BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1) - echo "ANDROID_SIGN_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV - echo Last build tool version is: $BUILD_TOOL_VERSION - - - uses: r0adkll/sign-android-release@v1 - name: Sign app APK - if: env.ANDROID_SIGNING_KEY != null - id: sign-rustdesk - with: - releaseDirectory: ./signed-apk - signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }} - alias: ${{ secrets.ANDROID_ALIAS }} - keyStorePassword: ${{ secrets.ANDROID_KEY_STORE_PASSWORD }} - keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }} - env: - # env.ANDROID_SIGN_TOOL_VERSION is set by Step "Setup sign tool version variable" - BUILD_TOOLS_VERSION: ${{ env.ANDROID_SIGN_TOOL_VERSION }} - - - name: Upload Artifacts - if: env.ANDROID_SIGNING_KEY != null && env.UPLOAD_ARTIFACT == 'true' - uses: actions/upload-artifact@master - with: - name: rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.apk - path: ${{steps.sign-rustdesk.outputs.signedReleaseFile}} - - - name: Publish signed apk package - if: env.ANDROID_SIGNING_KEY != null && env.UPLOAD_ARTIFACT == 'true' - uses: softprops/action-gh-release@v1 - with: - prerelease: true - tag_name: ${{ env.TAG_NAME }} - files: | - ${{steps.sign-rustdesk.outputs.signedReleaseFile}} - - - name: Publish unsigned apk package - if: env.ANDROID_SIGNING_KEY == null && env.UPLOAD_ARTIFACT == 'true' + - name: Combine unsigned app + run: | + tar czf rustdesk-${{ env.VERSION }}-unsigned.tar.gz *.dmg windows-x86_64 + + - name: Publish unsigned app uses: softprops/action-gh-release@v1 with: prerelease: true tag_name: ${{ env.TAG_NAME }} - files: | - signed-apk/rustdesk-${{ env.VERSION }}-universal${{ env.suffix }}.apk + files: rustdesk-${{ env.VERSION }}-unsigned.tar.gz build-rustdesk-linux: needs: [generate-bridge] @@ -1689,420 +891,3 @@ jobs: tag_name: ${{ env.TAG_NAME }} files: | res/rustdesk-${{ env.VERSION }}*.zst - - build-rustdesk-linux-sciter: - if: ${{ inputs.upload-artifact }} - needs: build-rustdesk-linux # not for dep, just make it run later for parallelism - runs-on: ${{ matrix.job.on }} - name: build-rustdesk-linux-sciter ${{ matrix.job.target }} - strategy: - fail-fast: false - matrix: - # use a high level qemu-user-static - job: - - { - arch: x86_64, - target: x86_64-unknown-linux-gnu, - on: ubuntu-20.04, - distro: ubuntu18.04, - deb_arch: amd64, - sciter_arch: x64, - vcpkg-triplet: x64-linux, - extra_features: ",hwcodec", - } - - { - arch: armv7, - target: armv7-unknown-linux-gnueabihf, - on: [self-hosted, Linux, ARM64], - distro: ubuntu18.04-rustdesk, - deb_arch: armhf, - sciter_arch: arm32, - vcpkg-triplet: arm-linux, - extra_features: "", - } - steps: - - name: Export GitHub Actions cache environment variables - uses: actions/github-script@v6 - with: - script: | - core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); - core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - - - name: Checkout source code - uses: actions/checkout@v4 - - - name: Free Space - run: | - df -h - free -m - - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@v1 - with: - toolchain: ${{ env.SCITER_RUST_VERSION }} - targets: ${{ matrix.job.target }} - components: "rustfmt" - - - name: Save Rust toolchain version - run: | - RUST_TOOLCHAIN_VERSION=$(cargo --version | awk '{print $2}') - echo "RUST_TOOLCHAIN_VERSION=$RUST_TOOLCHAIN_VERSION" >> $GITHUB_ENV - - - uses: rustdesk-org/run-on-arch-action@amd64-support - name: Build rustdesk sciter binary for ${{ matrix.job.arch }} - id: vcpkg - with: - arch: ${{ matrix.job.arch }} - distro: ${{ matrix.job.distro }} - githubToken: ${{ github.token }} - setup: | - ls -l "${PWD}" - dockerRunArgs: | - --volume "${PWD}:/workspace" - shell: /bin/bash - install: | - apt-get update - apt-get install -y \ - build-essential \ - clang \ - curl \ - gcc \ - git \ - g++ \ - libayatana-appindicator3-dev \ - libasound2-dev \ - libclang-dev \ - libdbus-1-dev \ - libglib2.0-dev \ - libgstreamer1.0-dev \ - libgstreamer-plugins-base1.0-dev \ - libgtk-3-dev \ - liblzma-dev \ - libpam0g-dev \ - libpulse-dev \ - libva-dev \ - libxcb-randr0-dev \ - libxcb-shape0-dev \ - libxcb-xfixes0-dev \ - libxdo-dev \ - libxfixes-dev \ - ninja-build \ - pkg-config \ - python3 \ - python3.7 \ - rpm \ - unzip \ - wget \ - xz-utils \ - zip - # arm-linux needs CMake and vcokg built from source as there - # are no prebuilts available from Kitware and Microsoft - if [ "${{ matrix.job.vcpkg-triplet }}" = "arm-linux" ]; then - # install gcc/g++ 8 for vcpkg and OpenSSL headers for CMake - apt-get install -y gcc-8 g++-8 libssl-dev - # bootstrap CMake amd add it to PATH - git clone --depth 1 https://github.com/kitware/cmake -b "v${{ env.SCITER_ARMV7_CMAKE_VERSION }}" /tmp/cmake - pushd /tmp/cmake - ./bootstrap --generator='Unix Makefiles' "--prefix=/opt/cmake-${{ env.SCITER_ARMV7_CMAKE_VERSION }}-linux-armhf" - make -j1 install - popd - rm -rf /tmp/cmake - export PATH="/opt/cmake-${{ env.SCITER_ARMV7_CMAKE_VERSION }}-linux-armhf/bin:$PATH" - fi - # bootstrap vcpkg and set VCPKG_ROOT - export VCPKG_ROOT=/opt/artifacts/vcpkg - mkdir -p /opt/artifacts - pushd /opt/artifacts - rm -rf vcpkg - git clone https://github.com/microsoft/vcpkg - pushd vcpkg - git reset --hard ${{ env.VCPKG_COMMIT_ID }} - # build vcpkg helper executable with gcc-8 for arm-linux but use prebuilt one on x64-linux - if [ "${{ matrix.job.vcpkg-triplet }}" = "arm-linux" ]; then - CC=/usr/bin/gcc-8 CXX=/usr/bin/g++-8 sh bootstrap-vcpkg.sh -disableMetrics - else - sh bootstrap-vcpkg.sh -disableMetrics - fi - popd - popd - # rust - pushd /opt - # do not use rustup, because memory overflow in qemu - wget --output-document rust.tar.gz https://static.rust-lang.org/dist/rust-${{env.RUST_TOOLCHAIN_VERSION}}-${{ matrix.job.target }}.tar.gz - tar -zxvf rust.tar.gz > /dev/null && rm rust.tar.gz - pushd rust-${{env.RUST_TOOLCHAIN_VERSION}}-${{ matrix.job.target }} - ./install.sh - popd - rm -rf rust-${{env.RUST_TOOLCHAIN_VERSION}}-${{ matrix.job.target }} - popd - # install newer nasm for aom - wget --output-document nasm.deb "http://ftp.us.debian.org/debian/pool/main/n/nasm/nasm_${{ env.SCITER_NASM_DEBVERSION }}_${{ matrix.job.deb_arch }}.deb" - dpkg -i nasm.deb - rm -f nasm.deb - run: | - # disable git safe.directory - git config --global --add safe.directory "*" - # set python3.7 as default python3 - update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1 - # add built CMake to PATH and set VCPKG_FORCE_SYSTEM_BINARIES Afor arm-linux - if [ "${{ matrix.job.vcpkg-triplet }}" = "arm-linux" ]; then - export PATH="/opt/cmake-${{ env.SCITER_ARMV7_CMAKE_VERSION }}-linux-armhf/bin:$PATH" - export VCPKG_FORCE_SYSTEM_BINARIES=1 - fi - # edit cargo config - mkdir -p ~/.cargo/ - echo """ - [source.crates-io] - registry = 'https://github.com/rust-lang/crates.io-index' - """ > ~/.cargo/config - cat ~/.cargo/config - # install dependencies from vcpkg - export VCPKG_ROOT=/opt/artifacts/vcpkg - # remove this when support higher version - export USE_AOM_391=1 - if ! $VCPKG_ROOT/vcpkg install --triplet ${{ matrix.job.vcpkg-triplet }} --x-install-root="$VCPKG_ROOT/installed"; then - find "${VCPKG_ROOT}/" -name "*.log" | while read -r _1; do - echo "$_1:" - echo "======" - cat "$_1" - echo "======" - echo "" - done - exit 1 - fi - head -n 100 "${VCPKG_ROOT}/buildtrees/ffmpeg/build-${{ matrix.job.vcpkg-triplet }}-rel-out.log" || true - # build rustdesk - python3 ./res/inline-sciter.py - export CARGO_INCREMENTAL=0 - cargo build --features inline${{ matrix.job.extra_features }} --release --bins --jobs 1 - # make debian package - mkdir -p ./Release - mv ./target/release/rustdesk ./Release/rustdesk - wget -O ./Release/libsciter-gtk.so https://github.com/c-smile/sciter-sdk/raw/master/bin.lnx/${{ matrix.job.sciter_arch }}/libsciter-gtk.so - export DEB_ARCH=${{ matrix.job.deb_arch }} - ./build.py --package ./Release - - - name: Rename rustdesk - shell: bash - run: | - for name in rustdesk*??.deb; do - # use cp to duplicate deb files to fit other packages. - cp "$name" "${name%%.deb}-${{ matrix.job.arch }}-sciter.deb" - done - - - name: Publish debian package - if: env.UPLOAD_ARTIFACT == 'true' - uses: softprops/action-gh-release@v1 - with: - prerelease: true - tag_name: ${{ env.TAG_NAME }} - files: | - rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}-sciter.deb - - - name: Upload deb - uses: actions/upload-artifact@master - if: env.UPLOAD_ARTIFACT == 'true' - with: - name: rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}-sciter.deb - path: rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}-sciter.deb - - build-appimage: - name: Build appimage ${{ matrix.job.target }} - needs: [build-rustdesk-linux] - runs-on: ubuntu-20.04 - if: ${{ inputs.upload-artifact }} - strategy: - fail-fast: false - matrix: - job: - - { target: x86_64-unknown-linux-gnu, arch: x86_64 } - - { target: aarch64-unknown-linux-gnu, arch: aarch64 } - steps: - - name: Checkout source code - uses: actions/checkout@v4 - - - name: Download Binary - uses: actions/download-artifact@master - with: - name: rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.deb - path: . - - - name: Rename Binary - run: | - mv rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.deb appimage/rustdesk.deb - - - name: Build appimage package - shell: bash - run: | - # install libarchive-tools for bsdtar command used in AppImageBuilder.yml - sudo apt-get update -y - sudo apt-get install -y libarchive-tools - # set-up appimage-builder - pushd /tmp - wget -O appimage-builder-x86_64.AppImage https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage - chmod +x appimage-builder-x86_64.AppImage - sudo mv appimage-builder-x86_64.AppImage /usr/local/bin/appimage-builder - popd - # run appimage-builder - pushd appimage - sudo appimage-builder --skip-tests --recipe ./AppImageBuilder-${{ matrix.job.arch }}.yml - - - name: Publish appimage package - if: env.UPLOAD_ARTIFACT == 'true' - uses: softprops/action-gh-release@v1 - with: - prerelease: true - tag_name: ${{ env.TAG_NAME }} - files: | - ./appimage/rustdesk-${{ env.VERSION }}-*.AppImage - - build-flatpak: - name: Build flatpak ${{ matrix.job.target }}${{ matrix.job.suffix }} - needs: - - build-rustdesk-linux - - build-rustdesk-linux-sciter - runs-on: ${{ matrix.job.on }} - if: ${{ inputs.upload-artifact }} - strategy: - fail-fast: false - matrix: - job: - - { - target: x86_64-unknown-linux-gnu, - distro: ubuntu18.04, - on: ubuntu-20.04, - arch: x86_64, - suffix: "", - } - - { - target: x86_64-unknown-linux-gnu, - distro: ubuntu18.04, - on: ubuntu-20.04, - arch: x86_64, - suffix: "-sciter", - } - - { - target: aarch64-unknown-linux-gnu, - # try out newer flatpak since error of "error: Nothing matches org.freedesktop.Platform in remote flathub" - distro: ubuntu22.04, - on: [self-hosted, Linux, ARM64], - arch: aarch64, - suffix: "", - } - steps: - - name: Checkout source code - uses: actions/checkout@v4 - - - name: Download Binary - uses: actions/download-artifact@master - with: - name: rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}${{ matrix.job.suffix }}.deb - path: . - - - name: Rename Binary - run: | - mv rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}${{ matrix.job.suffix }}.deb flatpak/rustdesk.deb - - - uses: rustdesk-org/run-on-arch-action@amd64-support - name: Build rustdesk flatpak package for ${{ matrix.job.arch }} - id: flatpak - with: - arch: ${{ matrix.job.arch }} - distro: ${{ matrix.job.distro }} - githubToken: ${{ github.token }} - setup: | - ls -l "${PWD}" - dockerRunArgs: | - --volume "${PWD}:/workspace" - shell: /bin/bash - install: | - apt-get update -y - apt-get install -y git flatpak flatpak-builder - run: | - # disable git safe.directory - git config --global --add safe.directory "*" - pushd /workspace - # flatpak deps - flatpak --user remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo - # package - pushd flatpak - git clone https://github.com/flathub/shared-modules.git --depth=1 - flatpak-builder --user --install-deps-from=flathub -y --force-clean --repo=repo ./build ./rustdesk.json - flatpak build-bundle ./repo rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}${{ matrix.job.suffix }}.flatpak com.rustdesk.RustDesk - - - name: Publish flatpak package - uses: softprops/action-gh-release@v1 - with: - prerelease: true - tag_name: ${{ env.TAG_NAME }} - files: | - flatpak/rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}${{ matrix.job.suffix }}.flatpak - - build-rustdesk-web: - if: False - name: build-rustdesk-web - runs-on: ubuntu-20.04 - strategy: - fail-fast: false - env: - RELEASE_NAME: web-basic - steps: - - name: Checkout source code - uses: actions/checkout@v4 - - - name: Prepare env - run: | - sudo apt-get update -y - sudo apt-get install -y wget npm - - - name: Install flutter - uses: subosito/flutter-action@v2.12.0 #https://github.com/subosito/flutter-action/issues/277 - with: - channel: "stable" - flutter-version: ${{ env.FLUTTER_VERSION }} - - - name: Patch flutter - shell: bash - run: | - cd $(dirname $(dirname $(which flutter))) - [[ "3.24.5" == ${{env.FLUTTER_VERSION}} ]] && git apply ${{ github.workspace }}/.github/patches/flutter_3.24.4_dropdown_menu_enableFilter.diff - - # https://rustdesk.com/docs/en/dev/build/web/ - - name: Build web - shell: bash - run: | - pushd flutter/web/js - npm install yarn -g - npm install typescript -g - npm install protoc -g - # Install protoc first, see: https://google.github.io/proto-lens/installing-protoc.html - npm install ts-proto - # Only works with vite <= 2.8, see: https://github.com/vitejs/vite/blob/main/docs/guide/build.md#chunking-strategy - npm install vite@2.8 - yarn install && yarn build - popd - - pushd flutter/web - wget https://github.com/rustdesk/doc.rustdesk.com/releases/download/console/web_deps.tar.gz - tar xzf web_deps.tar.gz - popd - - pushd flutter - flutter build web --release - cd build - cp ../web/README.md web - # TODO: Remove the following line when the web is almost complete. - echo -e "\n\nThis build is for preview and not full functionality." >> web/README.md - dir_name="rustdesk-${{ env.VERSION }}-${{ env.RELEASE_NAME }}" - mv web "${dir_name}" && tar czf "${dir_name}".tar.gz "${dir_name}" - sha256sum "${dir_name}".tar.gz - popd - - - name: Publish web - if: env.UPLOAD_ARTIFACT == 'true' - uses: softprops/action-gh-release@v1 - with: - prerelease: true - tag_name: ${{ env.TAG_NAME }} - files: | - flutter/build/rustdesk-${{ env.VERSION }}-${{ env.RELEASE_NAME }}.tar.gz