Files
RustDeskAutomaton/README.md
Jakub Tucek 472cd9e57c
Some checks failed
rustdesk-auto-build / build-and-publish (push) Has been cancelled
Add scripts for building and managing RustDesk versions
- Implement Build-CustomRustDesk.ps1 to build RustDesk with specified version and configuration.
- Create Get-LastBuiltVersion.ps1 to retrieve the last built version from a state file.
- Add Get-LatestRustDeskVersion.ps1 to fetch the latest version from GitHub releases.
- Develop Invoke-RustDeskPipeline.ps1 to orchestrate the build and deployment process.
- Introduce Publish-Artifacts.ps1 for publishing build artifacts via SMB or SCP.
- Implement Set-LastBuiltVersion.ps1 to update the state file with the last built version.
2026-03-17 14:20:29 +01:00

2.7 KiB

RustDesk Automated Build and Publish (Gitea + Windows Runner)

This repo automates your current manual process:

  1. Check latest RustDesk release.
  2. Compare with last built version.
  3. Build your custom client only when a new version exists.
  4. Publish artifacts to your download location.
  5. Persist last built version on runner disk.

Files

  • .gitea/workflows/rustdesk-auto-build.yml
  • scripts/Invoke-RustDeskPipeline.ps1
  • scripts/Get-LatestRustDeskVersion.ps1
  • scripts/Get-LastBuiltVersion.ps1
  • scripts/Set-LastBuiltVersion.ps1
  • scripts/Build-CustomRustDesk.ps1
  • scripts/Publish-Artifacts.ps1

What you must configure in Gitea

Use repo Variables and Secrets in Gitea Actions settings.

Variables

  • STATE_FILE_PATH
    • Example: C:\gitea-runner-state\rustdesk\last-built-version.txt
  • CONFIG_PATH
    • Example: infernalQS.json
  • BUILD_OUTPUT_DIR
    • Example: .\dist
  • DEPLOY_MODE
    • smb or scp
  • DESTINATION_PATH (required for smb mode)
    • Example: \\fileserver\rustdesk\downloads
  • SCP_DESTINATION (required for scp mode)
    • Example: deploy@your-host:/var/www/rustdesk/

Secrets

  • BUILDER_COMMAND
    • A command template to build your custom RustDesk client.
    • Supported placeholders:
      • {{version}} -> latest RustDesk tag (for example 1.4.2)
      • {{config}} -> absolute path to config file
      • {{output}} -> absolute output directory path

Example BUILDER_COMMAND values:

.\tools\rdgen-cli.exe build --config "{{config}}" --version "{{version}}" --output "{{output}}"
powershell -File .\tools\build-custom-client.ps1 -Version "{{version}}" -Config "{{config}}" -OutDir "{{output}}"

Runner prerequisites

Your existing self-hosted Windows runner should have:

  • Internet access to GitHub API (api.github.com).
  • Access to the destination path (SMB share or SCP target).
  • Build toolchain needed by your BUILDER_COMMAND.
  • scp available only if using DEPLOY_MODE=scp.

First run checklist

  1. Put your real build command in BUILDER_COMMAND secret.
  2. Make sure infernalQS.json in repo is the config you want.
  3. Set STATE_FILE_PATH to a persistent local path on runner machine.
  4. Set deploy mode and destination.
  5. Trigger workflow manually once (workflow_dispatch).
  6. Confirm artifacts were copied and latest-version.txt appears in output.

Behavior notes

  • Schedule runs hourly (17 * * * *).
  • If latest RustDesk version equals saved state, build is skipped.
  • On successful publish, state file is updated.

Common adjustments

  • Change schedule in .gitea/workflows/rustdesk-auto-build.yml.
  • Add runner labels to runs-on if your runner uses custom labels.
  • Extend Publish-Artifacts.ps1 if you need extra deployment steps.