Add release workflow for Linux and Windows#49
Open
hangzqcom wants to merge 5 commits into
Open
Conversation
5656hcx
reviewed
Jun 3, 2026
Contributor
5656hcx
left a comment
There was a problem hiding this comment.
Looks good, if already tested we can merge and see how it works for future releases.
One thing is this action will not update sub versions of individual drivers like QCOM_ADB_VERSION. Can we handle it through GitHub actions? Or do we want to keep individual version number for each drivers in the future?
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a GitHub Actions release workflow and a Windows build script to automate the release process for both Linux and Windows drivers.
Changes
.github/workflows/release.ymlA
workflow_dispatchworkflow triggered manually from the GitHub Actions UI. It accepts:linux_version1.0.6.5windows_version1.00.94.6base_branchmain(default)release_notesdraftfalse(default)Either or both versions can be supplied in a single run.
Linux job (fully automated on GitHub-hosted runner):
release-lnx-{version}src/linux/version.hwith the new version.debpackage viasrc/linux/build-deb.sh.deb+RELEASES.md+README.mdinto a ziprelease-lnx-v{version}If the build fails:
Windows job (branch/tag/release automation only — build is local):
release-win-{version}src/windows/qcversion.hwith the new versionrelease-win-v{version}build/build_drivers.ps1PowerShell build script for Windows drivers (requires Visual Studio + WDK on the build machine):
vswhereand WDK via registrysrc/windows/qcversion.hinf2catbuild/target/Drivers/Windows10/Release naming convention
release-lnx-{version}release-lnx-v{version}release-win-{version}release-win-v{version}Access control — only maintainers can trigger a release
The workflow enforces two independent gates:
Gate 1 — Explicit permission check (in-workflow)
The first step of the
validatejob calls the GitHub API to verify the triggering actor haswrite,maintain, oradminpermission on the repository. If not, the workflow fails immediately with a clear error message before any branch or tag is created.Gate 2 — Environment protection (
environment: release)Both release jobs use
environment: release. When configured in Settings → Environments with required reviewers, the workflow pauses for explicit human approval even after the permission check passes.To configure the environment (repo admin, one-time setup):
releaseIf the
releaseenvironment does not exist, Gate 1 (permission check) still enforces maintainer-only access.How to trigger a release
For Linux-only release:
linux_version:1.0.6.7windows_version: (leave empty)For Windows-only release:
linux_version: (leave empty)windows_version:1.00.94.7Example: Linux release
1.0.6.5Triggered via workflow dispatch with
linux_version=1.0.6.5:release-lnx-1.0.6.5and updatedsrc/linux/version.hqud_1.0.6.5_all.debviabuild-deb.shon a GitHub-hosted Ubuntu runnerrelease-lnx-v1.0.6.5qud_1.0.6.5_all.zipResult: https://github.com/qualcomm/qcom-usb-kernel-drivers/releases/tag/release-lnx-v1.0.6.5
Example: Windows release
1.00.94.6Step 1 — Trigger workflow with
windows_version=1.00.94.6:release-win-1.00.94.6and updatedsrc/windows/qcversion.hrelease-win-v1.00.94.6Step 2 — Build locally on a Windows machine with Visual Studio 2019 + WDK:
Step 3 — Upload and publish:
Result: https://github.com/qualcomm/qcom-usb-kernel-drivers/releases/tag/release-win-v1.00.94.6
Notes on Windows driver signing
The build script produces test-signed drivers (WDK auto-generates a
WDKTestCertper machine). For production distribution, drivers must be submitted to Microsoft Hardware Dev Center for attestation signing using an EV code-signing certificate. Thebuild/build_drivers.ps1script includes aSign-Filehelper that can be extended to support production signing.Test results
The complete workflow was tested on fork
hangzqcom/qcom-usb-kernel-driversafter all changes were applied.Linux release
1.0.6.6— workflow runPublished release: https://github.com/hangzqcom/qcom-usb-kernel-drivers/releases/tag/release-lnx-v1.0.6.6
Artifact:
qud_1.0.6.6_all.zipWindows release
1.00.94.6— tested previouslybuild_drivers.ps1)Published release: https://github.com/hangzqcom/qcom-usb-kernel-drivers/releases/tag/release-win-v1.00.94.6
Security
All
${{ inputs.* }}and${{ steps.*.outputs.* }}interpolations have been moved out ofrun:blocks into per-stepenv:sections to prevent shell injection (Semgreprun-shell-injectionrule).