Skip to content

Commit 1fa5a9d

Browse files
authored
Merge branch 'main' into lewis/comp-company-tasks
2 parents 741b115 + c6bc9f9 commit 1fa5a9d

File tree

4 files changed

+67
-38
lines changed

4 files changed

+67
-38
lines changed

.github/workflows/device-agent-release.yml

Lines changed: 52 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ jobs:
3131
- name: Compute next version
3232
id: version
3333
run: |
34-
# Get the latest production tag (ignore -staging suffixes)
35-
LATEST_TAG=$(git tag -l 'device-agent-v*' --sort=-v:refname | grep -v '\-staging' | head -1)
34+
# Get the latest production tag (only match clean semver tags like device-agent-v1.0.0)
35+
LATEST_TAG=$(git tag -l 'device-agent-v*' --sort=-v:refname | grep -E '^device-agent-v[0-9]+\.[0-9]+\.[0-9]+$' | head -1)
3636
3737
if [ -z "$LATEST_TAG" ]; then
3838
# No existing tags - start at 1.0.0
@@ -179,24 +179,43 @@ jobs:
179179
AUTO_UPDATE_URL: ${{ needs.detect-version.outputs.auto_update_url }}
180180
run: bun run package:win
181181

182-
- name: Setup SSL.com eSigner CodeSignTool
183-
uses: sslcom/esigner-codesign@develop
182+
- name: Setup Java for CodeSignTool
183+
uses: actions/setup-java@v4
184184
with:
185-
command: get_credential_ids
186-
username: ${{ secrets.ESIGNER_USERNAME }}
187-
password: ${{ secrets.ESIGNER_PASSWORD }}
188-
totp_secret: ${{ secrets.ESIGNER_TOTP_SECRET }}
185+
distribution: 'corretto'
186+
java-version: '11'
189187

190-
- name: Sign Windows EXE with SSL.com eSigner
191-
uses: sslcom/esigner-codesign@develop
192-
with:
193-
command: sign
194-
username: ${{ secrets.ESIGNER_USERNAME }}
195-
password: ${{ secrets.ESIGNER_PASSWORD }}
196-
credential_id: ${{ secrets.ESIGNER_CREDENTIAL_ID }}
197-
totp_secret: ${{ secrets.ESIGNER_TOTP_SECRET }}
198-
file_path: ${{ github.workspace }}/packages/device-agent/release
199-
override: true
188+
- name: Sign Windows EXE with SSL.com CodeSignTool
189+
shell: powershell
190+
working-directory: packages/device-agent/release
191+
env:
192+
ESIGNER_USERNAME: ${{ secrets.ESIGNER_USERNAME }}
193+
ESIGNER_PASSWORD: ${{ secrets.ESIGNER_PASSWORD }}
194+
ESIGNER_CREDENTIAL_ID: ${{ secrets.ESIGNER_CREDENTIAL_ID }}
195+
ESIGNER_TOTP_SECRET: ${{ secrets.ESIGNER_TOTP_SECRET }}
196+
run: |
197+
# Download and extract CodeSignTool
198+
Invoke-WebRequest -Uri "https://github.com/SSLcom/CodeSignTool/releases/download/v1.3.0/CodeSignTool-v1.3.0-windows.zip" -OutFile "codesigntool.zip"
199+
Expand-Archive -Path "codesigntool.zip" -DestinationPath "codesigntool"
200+
201+
# Find the jar file
202+
$jar = Get-ChildItem -Path "codesigntool" -Recurse -Filter "code_sign_tool-*.jar" | Select-Object -First 1
203+
if (-not $jar) { throw "CodeSignTool jar not found" }
204+
Write-Host "Found CodeSignTool jar at: $($jar.FullName)"
205+
206+
# Sign each .exe file using Java directly (skips .bat which needs bundled JDK)
207+
Get-ChildItem -Filter "*.exe" | ForEach-Object {
208+
Write-Host "Signing $($_.Name)..."
209+
& java -Xmx1024M -jar "$($jar.FullName)" sign `
210+
-username="$env:ESIGNER_USERNAME" `
211+
-password="$env:ESIGNER_PASSWORD" `
212+
-credential_id="$env:ESIGNER_CREDENTIAL_ID" `
213+
-totp_secret="$env:ESIGNER_TOTP_SECRET" `
214+
-input_file_path="$($_.FullName)" `
215+
-override="true"
216+
if ($LASTEXITCODE -ne 0) { throw "Code signing failed for $($_.Name)" }
217+
Write-Host "Signed $($_.Name) successfully"
218+
}
200219
201220
- name: Recalculate latest.yml hash after signing
202221
shell: bash
@@ -377,10 +396,10 @@ jobs:
377396

378397
- name: Upload installers to S3
379398
env:
380-
AWS_ACCESS_KEY_ID: ${{ secrets.APP_AWS_ACCESS_KEY_ID }}
381-
AWS_SECRET_ACCESS_KEY: ${{ secrets.APP_AWS_SECRET_ACCESS_KEY }}
399+
AWS_ACCESS_KEY_ID: ${{ needs.detect-version.outputs.s3_env == 'production' && secrets.APP_AWS_ACCESS_KEY_ID || secrets.APP_AWS_ACCESS_KEY_ID_STAGING }}
400+
AWS_SECRET_ACCESS_KEY: ${{ needs.detect-version.outputs.s3_env == 'production' && secrets.APP_AWS_SECRET_ACCESS_KEY || secrets.APP_AWS_SECRET_ACCESS_KEY_STAGING }}
382401
AWS_REGION: ${{ secrets.APP_AWS_REGION }}
383-
S3_BUCKET: ${{ secrets.FLEET_AGENT_BUCKET_NAME }}
402+
S3_BUCKET: ${{ needs.detect-version.outputs.s3_env == 'production' && secrets.FLEET_AGENT_BUCKET_NAME || secrets.FLEET_AGENT_BUCKET_NAME_STAGING }}
384403
VERSION: ${{ needs.detect-version.outputs.version }}
385404
S3_ENV: ${{ needs.detect-version.outputs.s3_env }}
386405
run: |
@@ -403,23 +422,23 @@ jobs:
403422
aws s3 cp artifacts/CompAI-Device-Agent-${VERSION}-setup.exe \
404423
s3://${S3_BUCKET}/${PREFIX}/windows/latest-setup.exe
405424
406-
# Linux
407-
aws s3 cp artifacts/CompAI-Device-Agent-${VERSION}-x64.deb \
408-
s3://${S3_BUCKET}/${PREFIX}/linux/CompAI-Device-Agent-${VERSION}-x64.deb
409-
aws s3 cp artifacts/CompAI-Device-Agent-${VERSION}-x64.deb \
410-
s3://${S3_BUCKET}/${PREFIX}/linux/latest-x64.deb
425+
# Linux (.deb uses amd64, .AppImage uses x86_64 architecture naming)
426+
aws s3 cp artifacts/CompAI-Device-Agent-${VERSION}-amd64.deb \
427+
s3://${S3_BUCKET}/${PREFIX}/linux/CompAI-Device-Agent-${VERSION}-amd64.deb
428+
aws s3 cp artifacts/CompAI-Device-Agent-${VERSION}-amd64.deb \
429+
s3://${S3_BUCKET}/${PREFIX}/linux/latest-amd64.deb
411430
412-
aws s3 cp artifacts/CompAI-Device-Agent-${VERSION}-x64.AppImage \
413-
s3://${S3_BUCKET}/${PREFIX}/linux/CompAI-Device-Agent-${VERSION}-x64.AppImage
414-
aws s3 cp artifacts/CompAI-Device-Agent-${VERSION}-x64.AppImage \
415-
s3://${S3_BUCKET}/${PREFIX}/linux/latest-x64.AppImage
431+
aws s3 cp artifacts/CompAI-Device-Agent-${VERSION}-x86_64.AppImage \
432+
s3://${S3_BUCKET}/${PREFIX}/linux/CompAI-Device-Agent-${VERSION}-x86_64.AppImage
433+
aws s3 cp artifacts/CompAI-Device-Agent-${VERSION}-x86_64.AppImage \
434+
s3://${S3_BUCKET}/${PREFIX}/linux/latest-x86_64.AppImage
416435
417436
- name: Upload auto-update files to S3
418437
env:
419-
AWS_ACCESS_KEY_ID: ${{ secrets.APP_AWS_ACCESS_KEY_ID }}
420-
AWS_SECRET_ACCESS_KEY: ${{ secrets.APP_AWS_SECRET_ACCESS_KEY }}
438+
AWS_ACCESS_KEY_ID: ${{ needs.detect-version.outputs.s3_env == 'production' && secrets.APP_AWS_ACCESS_KEY_ID || secrets.APP_AWS_ACCESS_KEY_ID_STAGING }}
439+
AWS_SECRET_ACCESS_KEY: ${{ needs.detect-version.outputs.s3_env == 'production' && secrets.APP_AWS_SECRET_ACCESS_KEY || secrets.APP_AWS_SECRET_ACCESS_KEY_STAGING }}
421440
AWS_REGION: ${{ secrets.APP_AWS_REGION }}
422-
S3_BUCKET: ${{ secrets.FLEET_AGENT_BUCKET_NAME }}
441+
S3_BUCKET: ${{ needs.detect-version.outputs.s3_env == 'production' && secrets.FLEET_AGENT_BUCKET_NAME || secrets.FLEET_AGENT_BUCKET_NAME_STAGING }}
423442
S3_ENV: ${{ needs.detect-version.outputs.s3_env }}
424443
run: |
425444
UPDATE_DIR="device-agent/${S3_ENV}/updates"

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## [1.83.1](https://github.com/trycompai/comp/compare/v1.83.0...v1.83.1) (2026-02-17)
2+
3+
4+
### Bug Fixes
5+
6+
* **ci:** fix Linux artifact names and consolidate all CI fixes ([#2144](https://github.com/trycompai/comp/issues/2144)) ([cbcf420](https://github.com/trycompai/comp/commit/cbcf420217c268fdfb35d9c03631a56d8822a028))
7+
* **ci:** handle pre-release tags in device agent version detection ([#2137](https://github.com/trycompai/comp/issues/2137)) ([b37f225](https://github.com/trycompai/comp/commit/b37f2252e9bf220600b2eb229364c4b6964b7cf0))
8+
* **ci:** pin Windows code signing to stable sslcom/esigner-codesign@v1.3.2 ([#2141](https://github.com/trycompai/comp/issues/2141)) ([5f35e35](https://github.com/trycompai/comp/commit/5f35e3500bbc6670464d83fb3c9eb7c5c3f4ec29))
9+
* **ci:** replace broken sslcom/esigner-codesign action with direct CodeSignTool invocation ([#2143](https://github.com/trycompai/comp/issues/2143)) ([884e0d2](https://github.com/trycompai/comp/commit/884e0d23dfce128b0359b3f5ad66d88aaba0c866))
10+
111
# [1.83.0](https://github.com/trycompai/comp/compare/v1.82.3...v1.83.0) (2026-02-13)
212

313

apps/portal/src/app/api/download-agent/constants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ export const DOWNLOAD_TARGETS: Record<
2424
contentType: 'application/octet-stream',
2525
},
2626
linux: {
27-
key: `${S3_PREFIX}/linux/latest-x64.deb`,
28-
filename: 'CompAI-Device-Agent-x64.deb',
27+
key: `${S3_PREFIX}/linux/latest-amd64.deb`,
28+
filename: 'CompAI-Device-Agent-amd64.deb',
2929
contentType: 'application/vnd.debian.binary-package',
3030
},
3131
};

packages/device-agent/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "@comp/device-agent",
3-
"version": "1.0.1",
4-
"description": "Comp AI Device Compliance Agent - Device Compliance Checks",
3+
"version": "1.0.0",
4+
"description": "Comp AI Device Agent - Endpoint Compliance",
55
"author": "Comp AI <hello@trycomp.ai>",
6-
"homepage": "https://trycomp.ai",
6+
"homepage": "https://trycomp.ai/",
77
"private": true,
88
"main": "dist/main/index.js",
99
"scripts": {

0 commit comments

Comments
 (0)