This document explains how we leverage PowerShell scripts and GitHub Actions to insert repository and organization metadata into the LabVIEW Icon Editor’s VI Package, ensuring each build is unique and traceable.
In a multi-fork or multi-organization environment, injecting the repository name and organization into the VI Package:
We achieve this by:
"Company Name" and "Author Name (Person or Company)" directly in the workflow using GitHub-provided variables (e.g., $ and $).modify-vipb-display-info action to merge this JSON into the .vipb (VI Package Builder) file.build-lvlibp and build-vi-package actions from the composite CI workflow..vip files with similar names.An abbreviated GitHub Actions example below mirrors the ci-composite.yml workflow. A version job first computes the semantic version and outputs MAJOR, MINOR, PATCH, and BUILD for downstream steps. The build-ppl job uses a matrix to compile both 32- and 64-bit packed libraries, and the build-vi-package job injects the display metadata and creates the final .vip file. Referring to the jobs by name—rather than line numbers—helps avoid future drift. The snippet highlights key steps such as compute-version, build-lvlibp, modify-vipb-display-info, and build-vi-package:
jobs:
version:
runs-on: self-hosted-windows-lv-ie
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: compute-version
uses: ./.github/actions/compute-version
outputs:
MAJOR: $
MINOR: $
PATCH: $
BUILD: $
build-ppl:
runs-on: self-hosted-windows-lv-ie
needs: version
strategy:
matrix:
bitness: [32, 64]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-lvlibp
with:
labview_version: 2021
supported_bitness: $
repo_root: $
major: $
minor: $
patch: $
build: $
commit: $
build-vi-package:
runs-on: self-hosted-windows-lv-ie
needs: [build-ppl, version]
steps:
- uses: actions/checkout@v4
- name: Generate display information JSON
id: display-info
shell: pwsh
run: |
$info = @{
"Company Name" = "$"
"Author Name (Person or Company)" = "$"
}
"json=$($info | ConvertTo-Json -Depth 5 -Compress)" >> $Env:GITHUB_OUTPUT
- uses: ./.github/actions/modify-vipb-display-info
with:
vipb_path: .github/actions/build-vi-package/NI Icon editor.vipb
labview_version: 2021
labview_minor_revision: 0
repo_root: $
supported_bitness: 64
major: $
minor: $
patch: $
build: $
commit: $
release_notes_file: $/Tooling/deployment/release_notes.md
display_information_json: $
- uses: ./.github/actions/build-vi-package
with:
labview_version: 2021
labview_minor_revision: 0
supported_bitness: 64
major: $
minor: $
patch: $
build: $
commit: $
release_notes_file: $/Tooling/deployment/release_notes.md
display_information_json: $
Note:
build-vi-packageruns outside the bitness matrix because the Icon Editor ships only a 64-bit VI Package; packaging the 32-bit output would duplicate artifacts.
Key points:
$ is the organization (or user) that owns the repo.$ is the repository name.https://github.com/<owner>/<repo>);Tooling/deployment/release_notes.md file as the Release Notes - Change Log field.modify-vipb-display-info and build-vi-package consume this JSON to embed the metadata directly in the .vip.compute-version determines the semantic version.build-lvlibp compiles the 32- and 64-bit packed libraries.CompanyName and AuthorName fields derived from GitHub variables.modify-vipb-display-info merges that JSON into the .vipb file.build-vi-package produces the final 64-bit LabVIEW 2021 (21.0) Icon Editor .vip package..vip as an artifact.The previous build system used a Build.ps1 script. For historical reference, you can still run it locally:
\.github\actions\build\Build.ps1 `
-RepoRoot "C:\labview-icon-editor-fork" `
-Major 2 -Minor 1 -Patch 0 -Build 5 `
-Commit "abc12345" `
-CompanyName "Acme Corporation" `
-AuthorName "acme-corp/lv-icon-editor" `
-Verbose
This legacy script produces a .vip file that, when inspected in VIPM or LabVIEW, shows “Acme Corporation” as the company and “acme-corp/lv-icon-editor” in the author field.
Injecting Repo and Organization fields in the Icon Editor’s VI Package ensures: