From 3a4ce7894c496a7d19402bebbfbcb156c43f3a76 Mon Sep 17 00:00:00 2001 From: Alec Date: Wed, 10 Jul 2024 22:05:05 -0400 Subject: [PATCH] Update publish CLI and workflow for single app --- .github/workflows/package-preview.yml | 2 +- apps/commonality/src/cli/commands/publish.ts | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/package-preview.yml b/.github/workflows/package-preview.yml index 68c95db0..c171b08a 100644 --- a/.github/workflows/package-preview.yml +++ b/.github/workflows/package-preview.yml @@ -21,4 +21,4 @@ jobs: - name: Build run: pnpm build - - run: pnpx pkg-pr-new publish --pnpm './apps/commonality' './apps/studio' + - run: pnpx pkg-pr-new publish --pnpm './apps/commonality' diff --git a/apps/commonality/src/cli/commands/publish.ts b/apps/commonality/src/cli/commands/publish.ts index 95c0dd86..5891e615 100644 --- a/apps/commonality/src/cli/commands/publish.ts +++ b/apps/commonality/src/cli/commands/publish.ts @@ -48,8 +48,16 @@ export const publish = command 'The API URL to publish to', process.env.COMMONALITY_API_URL ?? 'http://app.commonality.co/api/publish', ) - .requiredOption('--project ', 'The project ID to publish to') - .requiredOption('--key ', 'The publish key to publish with') + .requiredOption( + '--project ', + 'The project ID to publish to', + process.env.COMMONALITY_PROJECT_ID, + ) + .requiredOption( + '--key ', + 'The publish key to publish with', + process.env.COMMONALITY_PUBLISH_KEY, + ) .action(async (options) => { publishSpinner.start('Publishing snapshot...');