From 449e89608835f56846607aebd960b3a9354cafc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Sat, 10 Jan 2026 19:47:32 +0100 Subject: [PATCH] print resolved Zig version --- main.js | 3 +++ package-lock.json | 1 + package.json | 1 + 3 files changed, 5 insertions(+) diff --git a/main.js b/main.js index 8937cee..9edf96e 100644 --- a/main.js +++ b/main.js @@ -4,6 +4,7 @@ const fs = require('fs').promises; const core = require('@actions/core'); const tc = require('@actions/tool-cache'); const cache = require('@actions/cache'); +const exec = require('@actions/exec'); const common = require('./common'); const minisign = require('./minisign'); @@ -178,6 +179,8 @@ async function main() { } core.addPath(zig_dir); + const zig_version = (await exec.getExecOutput('zig', ['version'])).stdout.trim(); + core.info(`Resolved Zig version ${zig_version}`); const cache_path = common.getZigCachePath(); core.exportVariable('ZIG_GLOBAL_CACHE_DIR', cache_path); diff --git a/package-lock.json b/package-lock.json index af4e065..855af7f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "dependencies": { "@actions/cache": "^4.0.2", "@actions/core": "^1.11.1", + "@actions/exec": "^1.1.1", "@actions/github": "^6.0.1", "@actions/tool-cache": "^2.0.2" } diff --git a/package.json b/package.json index 54b9069..e5af241 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "dependencies": { "@actions/cache": "^4.0.2", "@actions/core": "^1.11.1", + "@actions/exec": "^1.1.1", "@actions/github": "^6.0.1", "@actions/tool-cache": "^2.0.2" }