diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0c79b9e59d..1e7015421a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -369,7 +369,12 @@ jobs: cp apps/backend/bin/agentctl${EXT} dist/kandev/bin/ mkdir -p dist/kandev/web cp -R dist/web/. dist/kandev/web/ - # cli/ was already placed by the build-cli job (downloaded above) + # cli/ was already placed by the build-cli job (downloaded above). + # actions/upload-artifact + download-artifact zip-roundtrip strips the + # executable bit, so re-apply it. The Homebrew formula's wrapper at + # bin/kandev does `exec libexec/cli/bin/cli.js`, which fails with + # "Permission denied" if this isn't +x. + chmod +x dist/kandev/cli/bin/cli.js cd dist tar -czf "kandev-${{ matrix.platform }}.tar.gz" kandev shasum -a 256 "kandev-${{ matrix.platform }}.tar.gz" > "kandev-${{ matrix.platform }}.tar.gz.sha256" diff --git a/apps/cli/package.json b/apps/cli/package.json index d53d7b2a05..7559ae1c4a 100644 --- a/apps/cli/package.json +++ b/apps/cli/package.json @@ -4,6 +4,11 @@ "private": false, "description": "Launcher for Kandev — manage tasks, orchestrate agents, review changes, and ship value", "license": "AGPL-3.0-only", + "repository": { + "type": "git", + "url": "git+https://github.com/kdlbs/kandev.git" + }, + "homepage": "https://github.com/kdlbs/kandev", "type": "commonjs", "bin": { "kandev": "bin/cli.js" diff --git a/scripts/release/package-npm-runtime.sh b/scripts/release/package-npm-runtime.sh index 2bf4004eb0..10d861055d 100755 --- a/scripts/release/package-npm-runtime.sh +++ b/scripts/release/package-npm-runtime.sh @@ -89,12 +89,20 @@ for platform in linux-x64 linux-arm64 macos-x64 macos-arm64 windows-x64; do os_field="${PLATFORM_TO_OS[$platform]}" cpu_field="${PLATFORM_TO_CPU[$platform]}" + # Note: `repository` is required when publishing with `npm publish --provenance`. + # npm's sigstore attestation embeds repo info from the OIDC token and refuses + # to publish if the package.json's repository.url doesn't match. cat > "$pkg_out/package.json" <