From bb1b8f927668192d525cb7aa21cb26000870295d Mon Sep 17 00:00:00 2001 From: Alden Hsu Date: Tue, 5 May 2026 10:24:16 -0400 Subject: [PATCH 1/5] offline msi installer with Agent binary embedded Co-Authored-By: Claude --- msi/Package.wxs | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/msi/Package.wxs b/msi/Package.wxs index 938148d0..a63eac16 100644 --- a/msi/Package.wxs +++ b/msi/Package.wxs @@ -19,7 +19,6 @@ - @@ -38,7 +37,10 @@ - + @@ -49,18 +51,6 @@ - see https://docs.firegiant.com/wix/tools/wixext/quietexec/#quiet-running-as-deferred-custom-actions --> - - - - - - From d39de8d7482fd8b2dfec882ef4f677c6171e9f7d Mon Sep 17 00:00:00 2001 From: Alden Hsu Date: Wed, 6 May 2026 11:36:38 -0400 Subject: [PATCH 2/5] add GHA to build msi Co-Authored-By: Claude --- .github/workflows/build-agent-msi.yaml | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/build-agent-msi.yaml diff --git a/.github/workflows/build-agent-msi.yaml b/.github/workflows/build-agent-msi.yaml new file mode 100644 index 00000000..0d8890f1 --- /dev/null +++ b/.github/workflows/build-agent-msi.yaml @@ -0,0 +1,32 @@ +name: Build Agent MSI + +on: + workflow_dispatch: + +jobs: + build: + runs-on: windows-2022 + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Download agent binary + shell: pwsh + run: | + $ProgressPreference = 'SilentlyContinue' + Invoke-WebRequest ` + -Uri "https://storage.googleapis.com/packages.viam.com/apps/viam-agent/viam-agent-stable-windows-x86_64" ` + -OutFile msi\viam-agent-from-installer.exe ` + -UseBasicParsing + + - name: Build MSI + shell: pwsh + run: | + dotnet tool restore + dotnet build msi -c Release + + - name: Upload MSI artifact + uses: actions/upload-artifact@v4 + with: + name: viam-agent-msi + path: msi/bin/x64/Release/Package.msi From eb887ff6072dd667358a1bd8952af7395e4e56a7 Mon Sep 17 00:00:00 2001 From: Alden Hsu Date: Wed, 6 May 2026 16:10:33 -0400 Subject: [PATCH 3/5] move msi installer build to workflow.yaml; upload Co-Authored-By: Claude --- .github/workflows/build-agent-msi.yaml | 32 ------------------ .github/workflows/workflow.yaml | 46 ++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 32 deletions(-) delete mode 100644 .github/workflows/build-agent-msi.yaml diff --git a/.github/workflows/build-agent-msi.yaml b/.github/workflows/build-agent-msi.yaml deleted file mode 100644 index 0d8890f1..00000000 --- a/.github/workflows/build-agent-msi.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: Build Agent MSI - -on: - workflow_dispatch: - -jobs: - build: - runs-on: windows-2022 - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Download agent binary - shell: pwsh - run: | - $ProgressPreference = 'SilentlyContinue' - Invoke-WebRequest ` - -Uri "https://storage.googleapis.com/packages.viam.com/apps/viam-agent/viam-agent-stable-windows-x86_64" ` - -OutFile msi\viam-agent-from-installer.exe ` - -UseBasicParsing - - - name: Build MSI - shell: pwsh - run: | - dotnet tool restore - dotnet build msi -c Release - - - name: Upload MSI artifact - uses: actions/upload-artifact@v4 - with: - name: viam-agent-msi - path: msi/bin/x64/Release/Package.msi diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 9b204c4e..4a942a63 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -90,6 +90,7 @@ jobs: id-token: 'write' outputs: pr_urls: ${{ steps.pr_urls.outputs.urls }} + version: ${{ steps.version.outputs.value }} env: # Empty on non-PR events; dev-version.sh consumes these to stamp PR # builds as v-pr... PR_HEAD_SHA is the branch @@ -104,6 +105,9 @@ jobs: - uses: actions/setup-go@v5 with: go-version-file: go.mod + - name: Compute version + id: version + run: echo "value=$(./dev-version.sh)" >> "$GITHUB_OUTPUT" - name: Build run: make all - id: 'gcp-signing-auth' @@ -136,6 +140,10 @@ jobs: done - name: Generate manifest run: make manifest + - uses: actions/upload-artifact@v4 + with: + name: viam-agent-windows + path: bin/viam-agent-*-windows-x86_64 - uses: google-github-actions/auth@v2 with: credentials_json: ${{ secrets.GCP_CREDENTIALS }} @@ -170,6 +178,44 @@ jobs: echo "EOF" } >> "$GITHUB_OUTPUT" + msi: + name: Build MSI + runs-on: windows-2022 + needs: build + steps: + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 + with: + name: viam-agent-windows + path: msi + - name: Build MSI + shell: bash + run: | + mv msi/viam-agent-*-windows-x86_64 msi/viam-agent-from-installer.exe + dotnet tool restore + dotnet build msi -c Release + mv msi/bin/x64/Release/Package.msi "viam-agent-${{ needs.build.outputs.version }}-windows-x86_64.msi" + - uses: actions/upload-artifact@v4 + with: + name: viam-agent-msi + path: viam-agent-*-windows-x86_64.msi + - uses: google-github-actions/auth@v2 + with: + credentials_json: ${{ secrets.GCP_CREDENTIALS }} + - uses: google-github-actions/setup-gcloud@v2 + - name: Upload MSI to GCS (Release) + if: github.event_name == 'release' + shell: bash + run: gsutil -h "Cache-Control:no-cache" cp viam-agent-*-windows-x86_64.msi gs://packages.viam.com/apps/viam-agent/ + - name: Upload MSI to GCS (Prerelease) + if: github.event_name != 'release' && github.event_name != 'pull_request' + shell: bash + run: gsutil -h "Cache-Control:no-cache" cp viam-agent-*-windows-x86_64.msi gs://packages.viam.com/apps/viam-agent/prerelease/ + - name: Upload MSI to GCS (PR dev release) + if: github.event_name == 'pull_request' + shell: bash + run: gsutil -h "Cache-Control:no-cache" cp viam-agent-*-windows-x86_64.msi "gs://packages.viam.com/apps/viam-agent/prerelease/pr-${{ github.event.pull_request.number }}/" + pr-dev-release-comment: name: Post PR dev release URLs runs-on: ubuntu-latest From 2a59978f0c5470a4ad97b8ca0a2a034407ac60a8 Mon Sep 17 00:00:00 2001 From: Alden Hsu Date: Mon, 11 May 2026 13:01:39 -0400 Subject: [PATCH 4/5] upload stable installer on release --- .github/workflows/workflow.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 4a942a63..f4e24fb6 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -206,7 +206,9 @@ jobs: - name: Upload MSI to GCS (Release) if: github.event_name == 'release' shell: bash - run: gsutil -h "Cache-Control:no-cache" cp viam-agent-*-windows-x86_64.msi gs://packages.viam.com/apps/viam-agent/ + run: | + cp viam-agent-*-windows-x86_64.msi viam-agent-stable-windows-x86_64.msi + gsutil -h "Cache-Control:no-cache" cp viam-agent-*-windows-x86_64.msi gs://packages.viam.com/apps/viam-agent/ - name: Upload MSI to GCS (Prerelease) if: github.event_name != 'release' && github.event_name != 'pull_request' shell: bash From 49bb81d4da8a407902c968cb1fb873ce9f921788 Mon Sep 17 00:00:00 2001 From: Alden Hsu Date: Mon, 11 May 2026 13:04:52 -0400 Subject: [PATCH 5/5] update installer language to discourage changing default options --- .github/workflows/workflow.yaml | 2 +- msi/Package.wxs | 2 +- msi/en-US.wxl | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 msi/en-US.wxl diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index f4e24fb6..497b1987 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -194,7 +194,7 @@ jobs: mv msi/viam-agent-*-windows-x86_64 msi/viam-agent-from-installer.exe dotnet tool restore dotnet build msi -c Release - mv msi/bin/x64/Release/Package.msi "viam-agent-${{ needs.build.outputs.version }}-windows-x86_64.msi" + mv msi/bin/x64/Release/en-US/Package.msi "viam-agent-${{ needs.build.outputs.version }}-windows-x86_64.msi" - uses: actions/upload-artifact@v4 with: name: viam-agent-msi diff --git a/msi/Package.wxs b/msi/Package.wxs index a63eac16..b62d522a 100644 --- a/msi/Package.wxs +++ b/msi/Package.wxs @@ -285,7 +285,7 @@ Text="Run as virtual service account (NT SERVICE\viam-agent)" /> + Text="(Advanced user option. Not recommended for production deployments.) If checked, the service runs with minimal privileges using a virtual service account. If unchecked, the service runs as Local System." /> diff --git a/msi/en-US.wxl b/msi/en-US.wxl new file mode 100644 index 00000000..00b1187f --- /dev/null +++ b/msi/en-US.wxl @@ -0,0 +1,4 @@ + + + +