Some checks failed
rustdesk-auto-build / build-and-publish (push) Has been cancelled
- 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.
RustDesk Automated Build and Publish (Gitea + Windows Runner)
This repo automates your current manual process:
- Check latest RustDesk release.
- Compare with last built version.
- Build your custom client only when a new version exists.
- Publish artifacts to your download location.
- Persist last built version on runner disk.
Files
.gitea/workflows/rustdesk-auto-build.ymlscripts/Invoke-RustDeskPipeline.ps1scripts/Get-LatestRustDeskVersion.ps1scripts/Get-LastBuiltVersion.ps1scripts/Set-LastBuiltVersion.ps1scripts/Build-CustomRustDesk.ps1scripts/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
- Example:
CONFIG_PATH- Example:
infernalQS.json
- Example:
BUILD_OUTPUT_DIR- Example:
.\dist
- Example:
DEPLOY_MODEsmborscp
DESTINATION_PATH(required forsmbmode)- Example:
\\fileserver\rustdesk\downloads
- Example:
SCP_DESTINATION(required forscpmode)- Example:
deploy@your-host:/var/www/rustdesk/
- Example:
Secrets
BUILDER_COMMAND- A command template to build your custom RustDesk client.
- Supported placeholders:
{{version}}-> latest RustDesk tag (for example1.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. scpavailable only if usingDEPLOY_MODE=scp.
First run checklist
- Put your real build command in
BUILDER_COMMANDsecret. - Make sure
infernalQS.jsonin repo is the config you want. - Set
STATE_FILE_PATHto a persistent local path on runner machine. - Set deploy mode and destination.
- Trigger workflow manually once (
workflow_dispatch). - Confirm artifacts were copied and
latest-version.txtappears 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-onif your runner uses custom labels. - Extend
Publish-Artifacts.ps1if you need extra deployment steps.
Description
Languages
PowerShell
100%