From 94f19656f9c9dd347690e3faa74f6c7d02bf8972 Mon Sep 17 00:00:00 2001 From: Jill Regan Date: Wed, 17 Jun 2026 11:05:03 -0400 Subject: [PATCH] rebuild --- dist/index.js | 7 +++++-- src/sdk-client.test.ts | 7 ++++++- src/utils.ts | 7 +++++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/dist/index.js b/dist/index.js index a29ec3f..953118d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -38392,11 +38392,14 @@ const extractSecret = (envName, shouldExportEnv) => { } }; const loadSecrets = async (shouldExportEnv) => { - // Pass User-Agent Information to the 1Password CLI + // Pass User-Agent Information to the 1Password CLI. + // Strip any prerelease suffix ("-beta.1") since semverToInt only + // accepts a plain MAJOR.MINOR.PATCH; a prerelease produces an invalid build. + const [releaseVersion] = package_namespaceObject.rE.split("-"); (0,dist.setClientInfo)({ name: "1Password GitHub Action", id: "GHA", - build: (0,dist.semverToInt)(package_namespaceObject.rE), + build: (0,dist.semverToInt)(releaseVersion ?? package_namespaceObject.rE), }); // Load secrets from environment variables using 1Password CLI. // Iterate over them to find 1Password references, extract the secret values, diff --git a/src/sdk-client.test.ts b/src/sdk-client.test.ts index dea601a..2492b8c 100644 --- a/src/sdk-client.test.ts +++ b/src/sdk-client.test.ts @@ -78,7 +78,12 @@ describe("loadSecretsFromSDK", () => { }); it("masks the integration key and strips its base64 padding", async () => { - await loadSecretsFromSDK(workloadId, environmentId, "integration-key==", false); + await loadSecretsFromSDK( + workloadId, + environmentId, + "integration-key==", + false, + ); expect(core.setSecret).toHaveBeenCalledWith("integration-key"); }); diff --git a/src/utils.ts b/src/utils.ts index f715ad4..ec45df9 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -111,11 +111,14 @@ export const extractSecret = ( }; export const loadSecrets = async (shouldExportEnv: boolean): Promise => { - // Pass User-Agent Information to the 1Password CLI + // Pass User-Agent Information to the 1Password CLI. + // Strip any prerelease suffix ("-beta.1") since semverToInt only + // accepts a plain MAJOR.MINOR.PATCH; a prerelease produces an invalid build. + const [releaseVersion] = version.split("-"); setClientInfo({ name: "1Password GitHub Action", id: "GHA", - build: semverToInt(version), + build: semverToInt(releaseVersion ?? version), }); // Load secrets from environment variables using 1Password CLI.