From 5acbafc644d5270046b89262f49ce5606bd19d36 Mon Sep 17 00:00:00 2001 From: Juan Escalada Date: Wed, 22 Jul 2026 11:49:29 +0900 Subject: [PATCH 1/2] ci: publish git-proxy-cli to npm --- .github/workflows/npm.yml | 30 +++++++++++++++++++++++- packages/git-proxy-cli/package.json | 3 +++ website/docs/quickstart/installation.mdx | 2 +- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index d75200837..3f2094861 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -24,7 +24,24 @@ jobs: - run: npm ci - run: npm run build - - name: Check if pre-release and publish to NPM + - name: Build git-proxy-cli workspace + run: npm run build -w packages/git-proxy-cli + + - name: Verify git-proxy-cli is in lockstep with the root package + run: | + ROOT_VERSION=$(node -p "require('./package.json').version") + CLI_VERSION=$(node -p "require('./packages/git-proxy-cli/package.json').version") + CLI_PIN=$(node -p "require('./packages/git-proxy-cli/package.json').dependencies['@finos/git-proxy']") + if [[ "$CLI_VERSION" != "$ROOT_VERSION" ]]; then + echo "Version mismatch: root=$ROOT_VERSION cli=$CLI_VERSION" + exit 1 + fi + if [[ "$CLI_PIN" != "$ROOT_VERSION" ]]; then + echo "CLI pins @finos/git-proxy@$CLI_PIN but root is $ROOT_VERSION" + exit 1 + fi + + - name: Check if pre-release and publish @finos/git-proxy to NPM run: | VERSION=$(node -p "require('./package.json').version") if [[ "$VERSION" == *"-"* ]]; then @@ -34,3 +51,14 @@ jobs: echo "Publishing stable release: $VERSION" npm publish --access=public fi + + - name: Check if pre-release and publish @finos/git-proxy-cli to NPM + run: | + VERSION=$(node -p "require('./package.json').version") + if [[ "$VERSION" == *"-"* ]]; then + echo "Publishing pre-release: $VERSION" + npm publish -w packages/git-proxy-cli --access=public --tag rc + else + echo "Publishing stable release: $VERSION" + npm publish -w packages/git-proxy-cli --access=public + fi diff --git a/packages/git-proxy-cli/package.json b/packages/git-proxy-cli/package.json index 660801136..3d1ccc013 100644 --- a/packages/git-proxy-cli/package.json +++ b/packages/git-proxy-cli/package.json @@ -5,6 +5,9 @@ "bin": { "git-proxy-cli": "./dist/index.js" }, + "files": [ + "dist" + ], "dependencies": { "axios": "^1.13.6", "yargs": "^18.0.0", diff --git a/website/docs/quickstart/installation.mdx b/website/docs/quickstart/installation.mdx index ad3681b1a..74773f68e 100644 --- a/website/docs/quickstart/installation.mdx +++ b/website/docs/quickstart/installation.mdx @@ -28,7 +28,7 @@ npm install -g @finos/git-proxy@latest To install a specific version of the GitProxy CLI, append the version to the end of the install command: ```bash -npm install -g @finos/git-proxy-cli@1.0.0 +npm install -g @finos/git-proxy-cli@2.0.0 ``` ### Install a local checkout From 27b8fce6e47e325228065aba23d133bd023057e2 Mon Sep 17 00:00:00 2001 From: Juan Escalada Date: Wed, 22 Jul 2026 12:41:43 +0900 Subject: [PATCH 2/2] chore: include axios and yargs in CLI deps for publish --- packages/git-proxy-cli/package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/git-proxy-cli/package.json b/packages/git-proxy-cli/package.json index 2195a5190..6cc0cc186 100644 --- a/packages/git-proxy-cli/package.json +++ b/packages/git-proxy-cli/package.json @@ -9,6 +9,8 @@ "dist" ], "dependencies": { + "axios": "^1.18.1", + "yargs": "^18.0.0", "@finos/git-proxy": "2.0.0" }, "scripts": {