This guide explains how to automate build, test, and distribution steps for the LabVIEW Icon Editor using GitHub Actions—with multiple pre-release channels (Alpha, Beta, RC), optional hotfix branches, and a toggleable Development Mode feature. It is designed to align with Gitflow practices, allowing you to enforce a hands-off approach where merges flow naturally from develop → release-alpha → release-beta → release-rc → main, while also ensuring forks can reuse the same build scripts.
Note
For troubleshooting and a more extensive FAQ, see troubleshooting-faq.md. For more detailed runner setup instructions, see runner-setup-guide.md.
- Introduction
- Quickstart / Step-by-Step Procedure
- Getting Started and Configuration
- Available CI Workflows
- Gitflow Branching and Versioning
- Branch Protection and Contributing
- External References
Automating your LabVIEW Icon Editor builds and releases offers several benefits:
- Gitflow alignment: merges flow from feature → develop → (alpha/beta/rc) → main without manual toggles.
- Label-based semantic versioning (
major,minor,patch). - Multiple pre-release channels (Alpha/Beta/RC) via dedicated branch names.
- Commit-based build number appended as
-build<commitCount>. - Hotfix branches for urgent final patch releases.
- Development Mode toggle if you need LabVIEW to reference local source code directly for debugging.
This workflow ensures that all forks of the repository can sync the latest build scripts from upstream (e.g., NI) and follow the same rules. If you keep your fork up to date, you benefit from any bug fixes or improvements made in the original repo.
-
Set up
.github/workflowsEnsure the following workflows exist (or adapt names as needed):development-mode-toggle.yml(Development Mode Toggle)ci-composite.yml(CI Pipeline (Composite); includes the Build VI Package job)
-
Configure Permissions
- In Settings → Actions → General, set Workflow permissions to allow the workflow to read repository contents and upload artifacts.
-
Make a Pull Request and Label It
- Apply at most one of
major,minor, orpatchto request a version bump. If no label is present, the workflow defaults to a patch bump. The workflow fails only if multiple release labels are applied. Seecompute-versionfor details.
- Apply at most one of
-
Merge to the Appropriate Branch
- In Gitflow, typical merges go from feature → develop, then eventually to:
release-alpha/*for early testing (-alpha.<N>),release-beta/*for later testing (-beta.<N>),release-rc/*for near-final (-rc.<N>),- and finally main for a final release (no suffix).
- Alternatively,
hotfix/*merges can go directly to main for quick patches.
- In Gitflow, typical merges go from feature → develop, then eventually to:
-
Check Build Artifacts
- The
.vipfile is generated and uploaded as a build artifact. - If you want to publish a GitHub Release, create one manually and upload the artifact.
- The
-
Optionally Enable Development Mode
- If you need LabVIEW to reference local source directly, run the Development Mode Toggle workflow (see Development Mode). Usually, you disable it for standard builds/tests.
For a visual reference, you may consult a Gitflow diagram that includes alpha/beta/rc branches as an extension of the typical release/ branch. This helps illustrate how merges flow between develop and main.
Development Mode configures LabVIEW for local debugging or specialized project setups. It often involves modifying labview.ini so LabVIEW references local source code. You can enable or disable it as needed:
- Enable:
- Run the Development Mode Toggle workflow with
mode=enable(or manually callSet_Development_Mode.ps1).
- Run the Development Mode Toggle workflow with
- Disable:
- Run the workflow with
mode=disable(or callRevertDevelopmentMode.ps1).
- Run the workflow with
Important
When Development Mode is enabled, you generally can’t test the final .vip install properly (since LabVIEW might be pointing to local source). Always disable dev mode before attempting a final install or distribution test.
For detailed runner configuration, see runner-setup-guide.md. Below is a short summary:
- Install Prerequisites
- LabVIEW 2021 (21.0), 32-bit and 64-bit
- PowerShell 7+
- Git for Windows
- Add a Self-Hosted Runner
- Go to Settings → Actions → Runners. Follow GitHub’s steps to register a Windows runner on your machine with LabVIEW installed.
- Label Your Runner
- For example, use
self-hosted-windows-lv-ie(orself-hosted-linux-lvfor Linux). Ensure your workflow’sruns-onreferences these labels.
- For example, use
Below are the two key workflows. Each one is defined in its own .yml file.
You’ll typically name the workflow file development-mode-toggle.yml. Its purpose is to enable or disable a “development mode” on a self-hosted runner that has LabVIEW installed.
What Is “Development Mode”?
- A specialized state for LabVIEW-centric projects, where LabVIEW is configured to load code from local source paths (or apply certain debugging tokens in
labview.ini). - This mode often prevents installing the final
.vipfor normal testing—so you’ll want to toggle it off once you finish coding or debugging.
Purpose of This Workflow
- Lets collaborators quickly switch a self-hosted runner into/out of dev mode.
- Often triggered manually (via
workflow_dispatch) or by other workflows (viaworkflow_call). - Simplifies toggling environment state without manual steps each time.
-
Trigger Manually
- Go to the Actions tab, select the "Development Mode Toggle" workflow, click "Run workflow."
- Choose
enableordisableto run the corresponding PowerShell script (Set_Development_Mode.ps1orRevertDevelopmentMode.ps1). - LabVIEW version is fixed to 2021 (
labview_version). - Choose a bitness (
bitness, default64). - The workflow runs on your self-hosted runner (e.g., labeled
self-hosted-windows-lv-ie).
-
Important Note for Testing
- With dev mode enabled, LabVIEW references local code, so installing the
.vipmay fail or cause conflicts. - After coding, disable dev mode before building or testing the final package.
- With dev mode enabled, LabVIEW references local code, so installing the
-
Trigger from Another Workflow
- You can call this workflow using
workflow_call. Pass the input parametermode=enableordisable. - Pass
labview_version: 2021if you include the input (other values are not supported). - Pass
bitness(32or64) to select the LabVIEW bitness. - The same runner used by the calling job is toggled accordingly.
- You can call this workflow using
A) Call from Another Workflow in the Same Repository
name: "My Other Workflow"
on:
workflow_dispatch:
jobs:
call-dev-mode:
runs-on: self-hosted-windows-lv-ie
steps:
- name: Invoke Dev Mode Toggle (enable)
uses: ./.github/workflows/development-mode-toggle.yml
with:
mode: enable
labview_version: 2021
bitness: 64B) Call from Another Repository
name: "Cross-Repo Dev Mode Toggle"
on:
workflow_dispatch:
jobs:
remote-dev-mode:
runs-on: self-hosted-windows-lv-ie
steps:
- name: Use remote Dev Mode Toggle
uses: <owner>/<repo>/.github/workflows/development-mode-toggle.yml@main
with:
mode: disable
labview_version: 2021
bitness: 64C) Call from a Fork
name: "Forked Dev Mode Example"
on:
workflow_dispatch:
jobs:
forked-workflow-call:
runs-on: self-hosted-windows-lv-ie
steps:
- name: Call Dev Mode Toggle from My Fork
uses: <your-fork>/<repo>/.github/workflows/development-mode-toggle.yml@my-feature-branch
with:
mode: enable
labview_version: 2021
bitness: 64All dev-mode logic resides in two PowerShell scripts:
Set_Development_Mode.ps1– Called when mode isenable.RevertDevelopmentMode.ps1– Called when mode isdisable.
- Check your primary README or docs for LabVIEW setup details.
- Official GitHub Docs on Reusing workflows.
- File Name:
ci-composite.yml - Purpose: A dedicated version job (using
compute-version) derives the version from PR labels and commit count, and the Build VI Package job builds the.vipartifact using that version output. - Features:
- Issue status gating: skips most jobs unless the branch name contains
issue-<number>(e.g.,issue-123,feature/issue-123) and the linked issue has Status In Progress. - Label-based version bump (
major,minor,patch); unlabeled pull requests default topatch(see.github/actions/compute-version/action.yml, used bycompute-versioninci-composite.yml). - Commit-based build number:
vX.Y.Z-build<commitCount>(plus optional pre-release suffix). - Multi-Channel detection for
release-alpha/*,release-beta/*,release-rc/*. - Upload Artifact: Builds the
.vipfile and uploads it as a workflow artifact (no automatic GitHub Release attachment).
- Issue status gating: skips most jobs unless the branch name contains
- Events: Typically triggered on:
- Push or PR to
main,develop,release-alpha/*,release-beta/*,release-rc/*,feature/*,hotfix/*, orissue-*. The workflow explicitly lists these pre-release patterns and does not use a genericrelease/*trigger. - Might also be triggered manually (
workflow_dispatch) if needed.
- Push or PR to
Gitflow typically involves:
develop: main integration branch for ongoing development.feature/*: branches offdevelopfor individual features.release/*: branched offdevelopwhen nearing release.hotfix/*: branched offmainfor urgent fixes.
In this repo, we extend the concept of release/* into release-alpha/*, release-beta/*, and release-rc/* to differentiate pre-release stages. The CI workflow mirrors this by triggering on these exact patterns. Merges flow as:
- feature → develop → release-alpha/X.Y → release-beta/X.Y → release-rc/X.Y → main.
Branches named:
release-alpha/*→ produces a version suffix-alpha.<N>.release-beta/*→ produces a version suffix-beta.<N>.release-rc/*→ produces a version suffix-rc.<N>.
Merging into these branches (or pushing directly to them) triggers a pre-release build. After final testing in release-rc/*, merging into main yields a stable release without any suffix.
hotfix/*merges produce a final release (no-rc,-alpha, or-beta).- Typically, you merge hotfix branches directly into main and then back into develop to keep them in sync.
When you open a Pull Request into develop, release-alpha/*, or release-beta/* (or even main/hotfix/*):
- Apply at most one of the labels
major,minor, orpatchto increment the corresponding version segment (e.g.,1.2.3→2.0.0ifmajor, etc.). - If multiple release labels are applied, the workflow fails. When no release label is present, it defaults to a patch bump. See
compute-versionfor implementation details.
Note: This means you can version-bump incrementally while merging into
develop(to reflect that new features are in development), or you can wait until you merge to a pre-release branch. Each time the build runs, the resulting.viphas an updated version (with a new build number, plus any alpha/beta/rc suffix if applicable).
- Determined by
git rev-list --count HEAD. - Appended as
-build<commitCount>in the final version string. - Always strictly the commit count—no overrides by default.
In order to enforce the Gitflow approach “hands-off”:
- Enable Branch Protection Rules:
- For example, protect
main,release-alpha/*,release-beta/*, andrelease-rc/*so that only approved Pull Requests can be merged, preventing direct pushes. - Require the Build VI Package job from the CI Pipeline (Composite) workflow to pass before merging.
- For example, protect
- Refer to
CONTRIBUTING.md:- Document your team’s policies on how merges flow from feature → develop → alpha/beta/rc → main.
- Outline any required approvals or code reviews.
Only the original (upstream) repo typically enforces these rules. Forks may choose to adopt them but are not forced to. However, if you submit a PR upstream, you’ll need to comply with the branch protections in place there.
- Multi-Channel Logic: See
multichannel-release-workflow.mdfor details on alpha/beta/RC branch strategy. - Runner Setup: For an in-depth guide on configuring your environment, see
runner-setup-guide.md. - Troubleshooting and FAQ: See
troubleshooting-faq.mdfor a detailed list of common issues, solutions, and frequently asked questions. - Contributing: For main-merge rules, code review guidelines, and other policies, see
CONTRIBUTING.md. - Gitflow Diagram: Atlassian Gitflow Workflow or any other standard resource to visualize the overall branching approach (extended with alpha/beta/rc branches).