From 9788c9ecc7f2eb59bc13b9cb8e9548fea0885cdb Mon Sep 17 00:00:00 2001 From: yorkeccak Date: Wed, 8 Jul 2026 15:24:48 +0100 Subject: [PATCH] Serve installer from get.valyu.ai, bump version to 1.2.2 - Point install one-liners, release notes, and upgrade commands at https://get.valyu.ai (raw.githubusercontent.com URLs keep working) - Add publish-installer workflow: uploads install.sh/install.ps1 to the install-scripts bucket via OIDC when they change on main, then verifies the served content matches - Fix version drift: v1.2.1 binaries self-reported v1.2.0 because src/lib/version.ts was not bumped; sync-skill-version.mjs now keeps it in lockstep with package.json --- .github/workflows/publish-installer.yml | 53 +++++++++++++++++++++++++ .github/workflows/release.yml | 4 +- README.md | 4 +- install.ps1 | 2 +- install.sh | 4 +- package.json | 4 +- scripts/sync-skill-version.mjs | 9 +++++ skills/valyu-cli/SKILL.md | 2 +- src/lib/install-source.ts | 6 +-- src/lib/version.ts | 2 +- 10 files changed, 75 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/publish-installer.yml diff --git a/.github/workflows/publish-installer.yml b/.github/workflows/publish-installer.yml new file mode 100644 index 0000000..46c99a2 --- /dev/null +++ b/.github/workflows/publish-installer.yml @@ -0,0 +1,53 @@ +# Publishes the install scripts to get.valyu.ai whenever they change on main. +# The scripts are served from an S3 bucket behind CloudFront; this repo's +# install.sh / install.ps1 remain the source of truth, and the +# raw.githubusercontent.com URLs keep working as before. +name: Publish installer + +on: + push: + branches: [main] + paths: + - install.sh + - install.ps1 + +permissions: {} + +jobs: + publish: + runs-on: blacksmith-2vcpu-ubuntu-2404 + permissions: + contents: read + id-token: write # OIDC token exchange with AWS; no stored credentials + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + # Pin to SHA: aws-actions/configure-aws-credentials@v4.3.1 + - uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a + with: + role-to-assume: arn:aws:iam::627665855519:role/valyu-cli-installer-publish + aws-region: us-east-1 + + # no-cache: script fixes propagate immediately, no CDN invalidation needed + - name: Upload install scripts + run: | + aws s3 cp install.sh s3://valyu-install-scripts/install.sh \ + --content-type "text/x-shellscript" --cache-control "no-cache" + aws s3 cp install.ps1 s3://valyu-install-scripts/install.ps1 \ + --content-type "text/plain" --cache-control "no-cache" + + - name: Verify get.valyu.ai serves the published scripts + run: | + sleep 5 + for pair in "install.sh|https://get.valyu.ai" "install.ps1|https://get.valyu.ai/install.ps1"; do + file="${pair%%|*}"; url="${pair##*|}" + served=$(curl -fsSL "$url" | shasum -a 256 | cut -d' ' -f1) + local_sum=$(shasum -a 256 "$file" | cut -d' ' -f1) + if [ "$served" != "$local_sum" ]; then + echo "Mismatch for $file: served=$served local=$local_sum" + exit 1 + fi + echo "OK: $url matches $file" + done diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e32bd0..6d656ad 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -166,7 +166,7 @@ jobs: **cURL (macOS / Linux)** ```sh - curl -fsSL https://raw.githubusercontent.com/valyuAI/valyu-cli/main/install.sh | bash + curl -fsSL https://get.valyu.ai | bash ``` **Node.js** @@ -181,7 +181,7 @@ jobs: **PowerShell (Windows)** ```sh - irm https://raw.githubusercontent.com/valyuAI/valyu-cli/main/install.ps1 | iex + irm https://get.valyu.ai/install.ps1 | iex ``` files: | dist/valyu-darwin-arm64.tar.gz diff --git a/README.md b/README.md index 4645899..ae38c2e 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Built for AI (or human) knowledge workers. ### cURL (macOS / Linux) ```sh -curl -fsSL https://raw.githubusercontent.com/valyuAI/valyu-cli/main/install.sh | bash +curl -fsSL https://get.valyu.ai | bash ``` ### Node.js @@ -36,7 +36,7 @@ brew install valyuAI/cli/valyu ### PowerShell (Windows) ```sh -irm https://raw.githubusercontent.com/valyuAI/valyu-cli/main/install.ps1 | iex +irm https://get.valyu.ai/install.ps1 | iex ``` Then authenticate: diff --git a/install.ps1 b/install.ps1 index e9daf2c..05d77b2 100644 --- a/install.ps1 +++ b/install.ps1 @@ -1,5 +1,5 @@ # Valyu CLI installer for Windows -# Usage: irm https://raw.githubusercontent.com/valyuAI/valyu-cli/main/install.ps1 | iex +# Usage: irm https://get.valyu.ai/install.ps1 | iex $ErrorActionPreference = "Stop" $Repo = "valyuAI/valyu-cli" diff --git a/install.sh b/install.sh index 92e914a..8916dd1 100755 --- a/install.sh +++ b/install.sh @@ -2,10 +2,10 @@ # Valyu CLI installer # # Usage: -# curl -fsSL https://raw.githubusercontent.com/valyuAI/valyu-cli/main/install.sh | bash +# curl -fsSL https://get.valyu.ai | bash # # Install specific version: -# curl -fsSL https://raw.githubusercontent.com/valyuAI/valyu-cli/main/install.sh | bash -s -- v1.0.2 +# curl -fsSL https://get.valyu.ai | bash -s -- v1.0.2 # set -e diff --git a/package.json b/package.json index 0e381fe..77de002 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@valyu/cli", - "version": "1.2.1", + "version": "1.2.2", "description": "The search CLI for knowledge workers", "license": "MIT", "repository": { @@ -38,7 +38,7 @@ "test": "vitest run", "test:watch": "vitest", "sync-skill-version": "node scripts/sync-skill-version.mjs", - "version": "pnpm run sync-skill-version && git add skills/valyu-cli/SKILL.md", + "version": "pnpm run sync-skill-version && git add skills/valyu-cli/SKILL.md src/lib/version.ts", "prepublishOnly": "pnpm run sync-skill-version && pnpm build && pnpm typecheck && pnpm test", "prepack": "pnpm run sync-skill-version && pnpm build" }, diff --git a/scripts/sync-skill-version.mjs b/scripts/sync-skill-version.mjs index 7ea9d65..52a89b3 100644 --- a/scripts/sync-skill-version.mjs +++ b/scripts/sync-skill-version.mjs @@ -11,3 +11,12 @@ content = content.replace(/version: "[^"]*"/, `version: "${version}"`); writeFileSync(skillPath, content); console.log(`Synced SKILL.md version to ${version}`); + +// Keep the runtime version constant in lockstep with package.json - it is +// what `valyu --version` reports from pkg-compiled binaries. +const versionTsPath = './src/lib/version.ts'; +const versionTs = readFileSync(versionTsPath, 'utf-8'); +const updated = versionTs.replace(/VERSION = '[^']*'/, `VERSION = '${version}'`); + +writeFileSync(versionTsPath, updated); +console.log(`Synced version.ts to ${version}`); diff --git a/skills/valyu-cli/SKILL.md b/skills/valyu-cli/SKILL.md index f1300b6..b4fdb82 100644 --- a/skills/valyu-cli/SKILL.md +++ b/skills/valyu-cli/SKILL.md @@ -12,7 +12,7 @@ description: > license: MIT metadata: author: valyu - version: "1.2.0" + version: "1.2.2" homepage: https://valyu.ai source: https://github.com/valyuAI/valyu-cli inputs: diff --git a/src/lib/install-source.ts b/src/lib/install-source.ts index 43273bf..0b0b758 100644 --- a/src/lib/install-source.ts +++ b/src/lib/install-source.ts @@ -114,13 +114,11 @@ export function upgradeCommandFor(source: InstallSource): UpgradeCommand { case 'binary': if (source.location === 'windows') { return { - command: - 'iwr https://raw.githubusercontent.com/valyuAI/valyu-cli/main/install.ps1 -UseBasicParsing | iex', + command: 'iwr https://get.valyu.ai/install.ps1 -UseBasicParsing | iex', }; } return { - command: - 'curl -fsSL https://raw.githubusercontent.com/valyuAI/valyu-cli/main/install.sh | bash', + command: 'curl -fsSL https://get.valyu.ai | bash', }; case 'dev': return { diff --git a/src/lib/version.ts b/src/lib/version.ts index 635ec41..ce98e09 100644 --- a/src/lib/version.ts +++ b/src/lib/version.ts @@ -1,2 +1,2 @@ -export const VERSION = '1.2.0'; +export const VERSION = '1.2.2'; export const PACKAGE_NAME = '@valyu/cli';