Plugin: modify Datbase interface #5242
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Author: Kang Lin<kl222@126.com> | |
| # workflow syntax: https://docs.github.com/actions/writing-workflows/workflow-syntax-for-github-actions | |
| name: build | |
| env: | |
| artifact_path: artifact_path | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| RabbitRemoteControl_VERSION: 0.0.36 | |
| RabbitRemoteControl_VERSION_PRE: v0.0.35 | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| ubuntu: | |
| uses: ./.github/workflows/ubuntu.yml | |
| secrets: inherit | |
| if: false | |
| aarch64: | |
| uses: ./.github/workflows/aarch64.yml | |
| secrets: inherit | |
| if: false | |
| appimage: | |
| uses: ./.github/workflows/appimage.yml | |
| secrets: inherit | |
| if: false | |
| linux: | |
| uses: ./.github/workflows/linux.yml | |
| secrets: inherit | |
| flatpak: | |
| uses: ./.github/workflows/flatpak.yml | |
| secrets: inherit | |
| snap: | |
| uses: ./.github/workflows/snap.yml | |
| if: false | |
| secrets: inherit | |
| docker: | |
| uses: ./.github/workflows/docker.yml | |
| secrets: inherit | |
| msvc: | |
| uses: ./.github/workflows/msvc.yml | |
| secrets: inherit | |
| mingw: | |
| uses: ./.github/workflows/mingw.yml | |
| secrets: inherit | |
| macos: | |
| uses: ./.github/workflows/macos.yml | |
| secrets: inherit | |
| macos_script: | |
| uses: ./.github/workflows/macos_script.yml | |
| secrets: inherit | |
| android: | |
| uses: ./.github/workflows/android.yml | |
| secrets: inherit | |
| doxygen: | |
| uses: ./.github/workflows/doxygen.yml | |
| secrets: inherit | |
| deploy: | |
| #if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| runs-on: ubuntu-latest | |
| needs: [linux, docker, flatpak, msvc, doxygen, android, macos] | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: false | |
| - name: clean test tag | |
| if: ${{ startsWith(github.ref, 'refs/heads/master') }} | |
| continue-on-error: true | |
| run: | | |
| gh release delete test_${{ github.ref_name }} -y --cleanup-tag | |
| - name: Download ubuntu | |
| uses: actions/download-artifact@v4 | |
| if: false | |
| with: | |
| pattern: ${{ needs.ubuntu.outputs.name }}* | |
| path: ${{ env.artifact_path }} | |
| merge-multiple: true | |
| - name: Download appimage | |
| uses: actions/download-artifact@v4 | |
| if: false | |
| with: | |
| pattern: ${{ needs.appimage.outputs.name }}* | |
| path: ${{ env.artifact_path }} | |
| merge-multiple: true | |
| - name: Download linux | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: ${{ needs.linux.outputs.name }}* | |
| path: ${{ env.artifact_path }} | |
| merge-multiple: true | |
| - name: Download docker | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: ${{ needs.docker.outputs.name }}* | |
| path: ${{ env.artifact_path }} | |
| merge-multiple: true | |
| - name: Download flatpak | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: RabbitRemoteControl_*.flatpak | |
| path: ${{ env.artifact_path }} | |
| merge-multiple: true | |
| - name: Download snap | |
| uses: actions/download-artifact@v4 | |
| if: false | |
| with: | |
| pattern: ${{ needs.snap.outputs.name }}* | |
| path: ${{ env.artifact_path }} | |
| merge-multiple: true | |
| - name: Download msvc | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: ${{ needs.msvc.outputs.name }}* | |
| path: ${{ env.artifact_path }} | |
| merge-multiple: true | |
| - name: Download mingw | |
| if: false | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ needs.mingw.outputs.name }} | |
| path: ${{ env.artifact_path }} | |
| merge-multiple: true | |
| - name: Download macos | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: ${{ needs.macos.outputs.name }}* | |
| path: ${{ env.artifact_path }} | |
| merge-multiple: true | |
| - name: Download android | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: ${{ needs.android.outputs.name }}* | |
| path: ${{ env.artifact_path }} | |
| merge-multiple: true | |
| - name: Download doxygen | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ needs.doxygen.outputs.name }} | |
| path: ${{ env.artifact_path }} | |
| merge-multiple: true | |
| - name: Process configure file | |
| run: | | |
| git clone https://github.com/KangLin/RabbitCommon.git | |
| ./RabbitCommon/Install/MergeJsonFile.sh \ | |
| "${{ github.workspace }}/update.json" \ | |
| "${{ env.artifact_path }}" "${{ env.artifact_path }}/version.json" | |
| rm ${{ env.artifact_path }}/*.json | |
| - name: Add change log file in Release.md file | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| run: | | |
| # 因为其它网站也可能需要,所以用完整的 URL | |
| echo "|:us: English|:cn: 中文|" >> ${{github.workspace}}/Release.md | |
| echo "| :- |:- |" >> ${{github.workspace}}/Release.md | |
| echo "|[Change log](https://github.com/KangLin/RabbitRemoteControl/blob/v${{env.RabbitRemoteControl_VERSION}}/ChangeLog.md)|[修改日志](https://github.com/KangLin/RabbitRemoteControl/blob/v${{env.RabbitRemoteControl_VERSION}}/ChangeLog_zh_CN.md)|" >> ${{github.workspace}}/Release.md | |
| echo "|Full Change: [${{env.RabbitRemoteControl_VERSION_PRE}}...v${{env.RabbitRemoteControl_VERSION}}](https://github.com/KangLin/RabbitRemoteControl/compare/${{env.RabbitRemoteControl_VERSION_PRE}}...v${{env.RabbitRemoteControl_VERSION}})|全部修改: [${{env.RabbitRemoteControl_VERSION_PRE}}...v${{env.RabbitRemoteControl_VERSION}}](https://github.com/KangLin/RabbitRemoteControl/compare/${{env.RabbitRemoteControl_VERSION_PRE}}...v${{env.RabbitRemoteControl_VERSION}})|" >> ${{github.workspace}}/Release.md | |
| BUILD_TIME=`date --rfc-3339=second` | |
| echo "|Build time: $BUILD_TIME|构建时间:$BUILD_TIME|" >> ${{github.workspace}}/Release.md | |
| echo "|Supported platforms: [Qt5](https://doc.qt.io/qt-5/supported-platforms.html) [Qt6](https://doc.qt.io/qt-6/supported-platforms.html)|支持平台: [Qt5](https://doc.qt.io/qt-5/supported-platforms.html) [Qt6](https://doc.qt.io/qt-6/supported-platforms.html)|" >> ${{github.workspace}}/Release.md | |
| #echo "|[File checksum](https://github.com/KangLin/RabbitRemoteControl/releases/download/${{ github.ref_name }}/CheckSum.md)|[文件检验和](https://github.com/KangLin/RabbitRemoteControl/releases/download/${{ github.ref_name }}/CheckSum.md)|" >> ${{github.workspace}}/Release.md | |
| echo "|[Online development document](https://rabbitremotecontrol.sourceforge.io/${{ github.ref_name }}/English/html/index.html)|[在线开发文档](https://rabbitremotecontrol.sourceforge.io/${{ github.ref_name }}/Chinese/html/index.html)|" >> ${{github.workspace}}/Release.md | |
| echo "" >> ${{github.workspace}}/Release.md | |
| - name: Add test comment in Release.md file | |
| if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | |
| run: | | |
| echo "**This release is for development and testing purposes only!**" >> ${{github.workspace}}/Release.md | |
| echo "" >> ${{github.workspace}}/Release.md | |
| echo "Commit: [${{github.sha}}](https://github.com/KangLin/RabbitRemoteControl/commit/${{github.sha}})" >> ${{github.workspace}}/Release.md | |
| echo "" >> ${{github.workspace}}/Release.md | |
| echo "Build time: `date --rfc-3339=second`" >> ${{github.workspace}}/Release.md | |
| echo "" >> ${{github.workspace}}/Release.md | |
| echo "[:us: Change log](https://github.com/KangLin/RabbitRemoteControl/blob/test_${{ github.ref_name }}/ChangeLog.md)" >> ${{github.workspace}}/Release.md | |
| echo "" >> ${{github.workspace}}/Release.md | |
| #echo "[File checksum](https://github.com/KangLin/RabbitRemoteControl/releases/download/test_${{ github.ref_name }}/CheckSum.md)" >> ${{github.workspace}}/Release.md | |
| echo "" >> ${{github.workspace}}/Release.md | |
| - name: Add download | |
| run: | | |
| export BRANCH_NAME=${{ github.ref_name }} | |
| if [ "${{ github.ref_name }}" == "master" ]; then | |
| export BRANCH_NAME=test_${{ github.ref_name }} | |
| fi | |
| echo "## Download:" >> ${{github.workspace}}/Release.md | |
| echo "" >> ${{github.workspace}}/Release.md | |
| echo "| | x86-64 (64-bit) | x86-32 (32-bit) | AArch64 (ARM64) | ARMv7 (32-bit) |:us: Comment|:cn: 备注|" >> ${{github.workspace}}/Release.md | |
| echo "|:- | :-------------- | :-------------- | :-------------- | :------------- |:------|---|" >> ${{github.workspace}}/Release.md | |
| echo "|Windows|[EXE](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_v${{env.RabbitRemoteControl_VERSION}}_win64_msvc2022_64_qt6.9.3_Setup.exe)|[EXE](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_v${{env.RabbitRemoteControl_VERSION}}_win32_msvc2019_qt5.15.2_Setup.exe)|[EXE](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_v${{env.RabbitRemoteControl_VERSION}}_win64_msvc2022_arm64_qt6.9.3_Setup.exe)| |Supported platforms: [x86-32(Qt5)](https://doc.qt.io/qt-5/supported-platforms.html) [x86-64(Qt6)](https://doc.qt.io/qt-6/supported-platforms.html)|支持平台:[x86-32(Qt5)](https://doc.qt.io/qt-5/supported-platforms.html) [x86-64(Qt6)](https://doc.qt.io/qt-6/supported-platforms.html)|" >> ${{github.workspace}}/Release.md | |
| echo "|Android|[APK](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_v${{env.RabbitRemoteControl_VERSION}}_android_x86_64_qt6.9.3_Release.apk) | |[APK](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_v${{env.RabbitRemoteControl_VERSION}}_android_arm64_v8a_qt6.9.3_Release.apk)| |Experiment|实验性的|" >> ${{github.workspace}}/Release.md | |
| echo "|Macos|[App zip](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_v${{env.RabbitRemoteControl_VERSION}}_macos-15-intel.zip) [dmg](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_v${{env.RabbitRemoteControl_VERSION}}_macos-15-intel.dmg)||[App zip](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_v${{env.RabbitRemoteControl_VERSION}}_macos-14.zip) [dmg](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_v${{env.RabbitRemoteControl_VERSION}}_macos-14.dmg)||Experiment|实验性的|" >> ${{github.workspace}}/Release.md | |
| echo "|Linux|[zip file of install AppImage](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_x86_64_Setup.zip)| |[zip file of install AppImage](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_aarch64_Setup.zip)| |Unzip the zip file, then execute \`install.sh\` to install shortcuts for application, links, and directories in graphical user interfaces (GUIs), or execute \`./RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_x86_64.AppImage\` to run program in the terminal.|解压 zip 文件,然后执行 \`install.sh\` 安装用于图形界面的目录、桌面快捷方式。或者在终端中执行 \`RabbitRemoteControl*.AppImage\` 文件。|" >> ${{github.workspace}}/Release.md | |
| echo "|Ubuntu 24.04|[DEB](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_ubuntu-24.04_amd64.deb)| |[DEB](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_ubuntu-24.04-arm_arm64.deb)| |Because the system library version is too low, some functions are limited. Run \`sudo apt install ./rabbitremotecontrol_*.deb\` to install it.|因为系统库版本太低,所以一些功能受限。运行命令 \`sudo apt install ./rabbitremotecontrol_*.deb\` 进行安装。 |" >> ${{github.workspace}}/Release.md | |
| echo "|Ubuntu 25.04|[DEB](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_ubuntu25.04_x86_64.deb)| |[DEB](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_ubuntu25.04_aarch64.deb)| | Run \`sudo apt install ./rabbitremotecontrol_*.deb\` to install it. | 运行命令 \`sudo apt install ./rabbitremotecontrol_*.deb\` 进行安装。 |" >> ${{github.workspace}}/Release.md | |
| echo "|Ubuntu 26.04|[DEB](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_ubuntu26.04_x86_64.deb)| |[DEB](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_ubuntu26.04_aarch64.deb)| | Run \`sudo apt install ./rabbitremotecontrol_*.deb\` to install it. | 运行命令 \`sudo apt install ./rabbitremotecontrol_*.deb\` 进行安装。 |" >> ${{github.workspace}}/Release.md | |
| echo "|Debian 12|[DEB](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_debian12_x86_64.deb)| |[DEB](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_debian12_aarch64.deb)| |Because the system library version is too low, some functions are limited. Run \`sudo apt install ./rabbitremotecontrol_*.deb\` to install it.|因为系统库版本太低,所以一些功能受限。运行命令 \`sudo apt install ./rabbitremotecontrol_*.deb\` 进行安装。 |" >> ${{github.workspace}}/Release.md | |
| echo "|Debian 13|[DEB](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_debian13_x86_64.deb)| |[DEB](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol_${{env.RabbitRemoteControl_VERSION}}_debian13_aarch64.deb)| |Run \`sudo apt install ./rabbitremotecontrol_*.deb\` to install it. | 运行命令 \`sudo apt install ./rabbitremotecontrol_*.deb\` 进行安装。 |" >> ${{github.workspace}}/Release.md | |
| RPM_VERSION=${RabbitRemoteControl_VERSION//-/\_} | |
| echo "|Fedora 41|[RPM](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol-${RPM_VERSION}-1.fc41.x86_64.rpm)| |[RPM](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/rabbitremotecontrol-${RPM_VERSION}-1.fc41.aarch64.rpm)| |Run \`sudo dnf install \"rpm file\"\` to install it. |执行命令 \`sudo dnf install \"rpm file\"\` 进行安装。 |" >> ${{github.workspace}}/Release.md | |
| - name: Add download in test | |
| if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | |
| run: | | |
| export BRANCH_NAME=${{ github.ref_name }} | |
| if [ "${{ github.ref_name }}" == "master" ]; then | |
| export BRANCH_NAME=test_${{ github.ref_name }} | |
| fi | |
| echo "|Flatpak|[flatpak](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_v${{env.RabbitRemoteControl_VERSION}}_Linux_x86_64.flatpak)| |[flatpak](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_v${{env.RabbitRemoteControl_VERSION}}_Linux_aarch64.flatpak)| |Run \`flatpak install \"flatpak File\" [--user]\` to install it.|执行命令 \`flatpak install \"flatpak File\" [--user]\` 进行安装。|" >> ${{github.workspace}}/Release.md | |
| - name: Add snap donwload in Release.md file | |
| run: | | |
| export BRANCH_NAME=${{ github.ref_name }} | |
| if [ "${{ github.ref_name }}" == "master" ]; then | |
| export BRANCH_NAME=test_${{ github.ref_name }} | |
| fi | |
| echo "" >> ${{github.workspace}}/Release.md | |
| echo "[Download development document](https://github.com/KangLin/RabbitRemoteControl/releases/download/${BRANCH_NAME}/RabbitRemoteControl_v${{env.RabbitRemoteControl_VERSION}}_document.zip)" >> ${{github.workspace}}/Release.md | |
| echo "" >> ${{github.workspace}}/Release.md | |
| echo "[](https://flathub.org/apps/io.github.KangLin.RabbitRemoteControl)" >> ${{github.workspace}}/Release.md | |
| echo "" >> ${{github.workspace}}/Release.md | |
| echo "[](https://snapcraft.io/rabbitremotecontrol)" >> ${{github.workspace}}/Release.md | |
| echo "" >> ${{github.workspace}}/Release.md | |
| - name: Add artifact sha256sum in Release.md file | |
| run: | | |
| echo "" >> ${{github.workspace}}/Release.md | |
| echo "## File checksum:" >> ${{github.workspace}}/CheckSum.md | |
| echo "" >> ${{github.workspace}}/CheckSum.md | |
| echo "|File|Checksum(md5)|Checksum(sha256)|" >> ${{github.workspace}}/CheckSum.md | |
| echo "| :- | :- |:-|" >> ${{github.workspace}}/CheckSum.md | |
| cd ${{ env.artifact_path }} | |
| for file in * | |
| do | |
| echo "$file" | |
| if [ -f $file ]; then | |
| if [ "${file##*.}" != "xml" ] && [ "${file##*.}" != "json" ]; then | |
| SumMd5=`md5sum $file | awk '{print "|", $2, "|", $1, "|"}'` | |
| Sum256=`sha256sum $file | awk '{print $1, "|"}'` | |
| echo "${SumMd5}${Sum256}" >> ${{github.workspace}}/CheckSum.md | |
| fi | |
| else | |
| rm -fr $file | |
| fi | |
| done | |
| cat ${{github.workspace}}/CheckSum.md >> ${{github.workspace}}/Release.md | |
| echo "" >> ${{github.workspace}}/Release.md | |
| # See: [访问有关工作流运行的上下文信息](https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#github-context) | |
| - name: Create Github Release | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| continue-on-error: true | |
| run: | | |
| gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --notes-file ${{github.workspace}}/Release.md | |
| - name: Upload To Github Release | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| run: | | |
| gh release upload ${{ github.ref_name }} ${{github.workspace}}/${{ env.artifact_path }}/* ${{github.workspace}}/update.json ${{github.workspace}}/Release.md ${{github.workspace}}/CheckSum.md ${{github.workspace}}/App/Client/Resource/Stats/* | |
| - name: Upload test tag To Github Release | |
| if: ${{ startsWith(github.ref, 'refs/heads/master') }} | |
| run: | | |
| gh release create test_${{ github.ref_name }} --prerelease --latest=false --title "Recently developed build - test_${{ github.ref_name }}" --notes-file ${{github.workspace}}/Release.md | |
| gh release upload test_${{ github.ref_name }} --clobber ${{github.workspace}}/${{ env.artifact_path }}/* ${{github.workspace}}/update.json ${{github.workspace}}/Release.md ${{github.workspace}}/CheckSum.md | |
| - name: Update artifact | |
| if: false | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Release.md | |
| path: | | |
| ${{github.workspace}}/Release.md | |
| ${{github.workspace}}/CheckSum.md |