@@ -613,6 +613,13 @@ jobs:
613
613
curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}-suse-${{ matrix.job.arch }}.rpm" ${{ inputs.apiServer }}/api/save_custom_client
614
614
curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./output/${{ inputs.filename }}-${{ matrix.job.arch }}.pkg.tar.zst" ${{ inputs.apiServer }}/api/save_custom_client || true
615
615
616
+ - name : Upload deb
617
+ uses : actions/upload-artifact@master
618
+ if : env.UPLOAD_ARTIFACT == 'true'
619
+ with :
620
+ name : ${{ inputs.filename }}-${{ matrix.job.arch }}.deb
621
+ path : ./output/${{ inputs.filename }}-${{ matrix.job.arch }}.deb
622
+
616
623
- name : Report Status
617
624
uses : fjogeleit/http-request-action@v1
618
625
with :
@@ -639,6 +646,142 @@ jobs:
639
646
customHeaders : ' {"Content-Type": "application/json"}'
640
647
data : ' {"uuid": "${{ inputs.uuid }}", "status": "Generation cancelled, try again"}'
641
648
649
+ build-appimage :
650
+ name : Build appimage ${{ matrix.job.target }}
651
+ needs : [build-rustdesk-linux]
652
+ runs-on : ubuntu-22.04
653
+ strategy :
654
+ fail-fast : false
655
+ matrix :
656
+ job :
657
+ - { target: x86_64-unknown-linux-gnu, arch: x86_64 }
658
+ - { target: aarch64-unknown-linux-gnu, arch: aarch64 }
659
+ steps :
660
+ - name : Checkout source code
661
+ uses : actions/checkout@v4
662
+ with :
663
+ submodules : recursive
664
+
665
+ - name : Download Binary
666
+ uses : actions/download-artifact@master
667
+ with :
668
+ name : ${{ inputs.filename }}-${{ matrix.job.arch }}.deb
669
+ path : .
670
+
671
+ - name : Rename Binary
672
+ run : |
673
+ mv ${{ inputs.filename }}-${{ matrix.job.arch }}.deb appimage/rustdesk.deb
674
+
675
+ - name : Build appimage package
676
+ shell : bash
677
+ run : |
678
+ # install libarchive-tools for bsdtar command used in AppImageBuilder.yml
679
+ sudo apt-get update -y
680
+ sudo apt-get install -y libarchive-tools
681
+ # set-up appimage-builder
682
+ pushd /tmp
683
+ 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
684
+ chmod +x appimage-builder-x86_64.AppImage
685
+ sudo mv appimage-builder-x86_64.AppImage /usr/local/bin/appimage-builder
686
+ popd
687
+ # run appimage-builder
688
+ pushd appimage
689
+ sudo appimage-builder --skip-tests --recipe ./AppImageBuilder-${{ matrix.job.arch }}.yml
690
+ mv ./appimage/rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}.AppImage ./appimage/${{ inputs.filename }}-${{ matrix.job.arch }}.AppImage
691
+
692
+ - name : send file to rdgen server
693
+ if : ${{ fromJson(inputs.extras).rdgen == 'true' }}
694
+ shell : bash
695
+ run : |
696
+ curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./appimage/${{ inputs.filename }}-${{ matrix.job.arch }}.AppImage" -F "uuid=${{ inputs.uuid }}" ${{ secrets.GENURL }}/save_custom_client
697
+
698
+ - name : send file to api server
699
+ if : ${{ fromJson(inputs.extras).rdgen == 'false' }}
700
+ shell : bash
701
+ run : |
702
+ curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./appimage/${{ inputs.filename }}-${{ matrix.job.arch }}.AppImage" ${{ inputs.apiServer }}/api/save_custom_client
703
+
704
+ build-flatpak :
705
+ name : Build flatpak ${{ matrix.job.target }}${{ matrix.job.suffix }}
706
+ needs :
707
+ - build-rustdesk-linux
708
+ runs-on : ${{ matrix.job.on }}
709
+ strategy :
710
+ fail-fast : false
711
+ matrix :
712
+ job :
713
+ - {
714
+ target : x86_64-unknown-linux-gnu,
715
+ distro : ubuntu18.04,
716
+ on : ubuntu-22.04,
717
+ arch : x86_64,
718
+ suffix : " " ,
719
+ }
720
+ - {
721
+ target : aarch64-unknown-linux-gnu,
722
+ # try out newer flatpak since error of "error: Nothing matches org.freedesktop.Platform in remote flathub"
723
+ distro : ubuntu22.04,
724
+ on : ubuntu-22.04-arm,
725
+ arch : aarch64,
726
+ suffix : " " ,
727
+ }
728
+ steps :
729
+ - name : Checkout source code
730
+ uses : actions/checkout@v4
731
+ with :
732
+ submodules : recursive
733
+
734
+ - name : Download Binary
735
+ uses : actions/download-artifact@master
736
+ with :
737
+ name : ${{ inputs.filename }}-${{ matrix.job.arch }}.deb
738
+ path : .
739
+
740
+ - name : Rename Binary
741
+ run : |
742
+ mv ${{ inputs.filename }}-${{ matrix.job.arch }}.deb flatpak/rustdesk.deb
743
+
744
+ - uses : rustdesk-org/run-on-arch-action@amd64-support
745
+ name : Build rustdesk flatpak package for ${{ matrix.job.arch }}
746
+ id : flatpak
747
+ with :
748
+ arch : ${{ matrix.job.arch }}
749
+ distro : ${{ matrix.job.distro }}
750
+ githubToken : ${{ github.token }}
751
+ setup : |
752
+ ls -l "${PWD}"
753
+ dockerRunArgs : |
754
+ --volume "${PWD}:/workspace"
755
+ shell : /bin/bash
756
+ install : |
757
+ apt-get update -y
758
+ apt-get install -y git flatpak flatpak-builder
759
+ run : |
760
+ # disable git safe.directory
761
+ git config --global --add safe.directory "*"
762
+ pushd /workspace
763
+ # flatpak deps
764
+ flatpak --user remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
765
+ # package
766
+ pushd flatpak
767
+ git clone https://github.com/flathub/shared-modules.git --depth=1
768
+ flatpak-builder --user --install-deps-from=flathub -y --force-clean --repo=repo ./build ./rustdesk.json
769
+ flatpak build-bundle ./repo ${{ inputs.filename }}-${{ matrix.job.arch }}.flatpak com.rustdesk.RustDesk
770
+
771
+ - name : send file to rdgen server
772
+ if : ${{ fromJson(inputs.extras).rdgen == 'true' }}
773
+ shell : bash
774
+ run : |
775
+ curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./${{ inputs.filename }}-${{ matrix.job.arch }}.flatpak" -F "uuid=${{ inputs.uuid }}" ${{ secrets.GENURL }}/save_custom_client
776
+
777
+ - name : send file to api server
778
+ if : ${{ fromJson(inputs.extras).rdgen == 'false' }}
779
+ shell : bash
780
+ run : |
781
+ curl -i -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer ${{ fromJson(inputs.extras).token }}" -F "file=@./${{ inputs.filename }}-${{ matrix.job.arch }}.flatpak" ${{ inputs.apiServer }}/api/save_custom_client
782
+
783
+
784
+
642
785
deploy :
643
786
needs : build-rustdesk-linux
644
787
runs-on : ubuntu-latest
0 commit comments