Skip to content

Commit 3f77aeb

Browse files
committed
cleanup
1 parent fdce23a commit 3f77aeb

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed
File renamed without changes.

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
path: ${{ runner.temp }}
5858
- uses: ./.github/actions/setup
5959
- name: Deploy Published Workers
60-
run: pnpm runx deploy-published-workers
60+
run: pnpm runx deploy-published-workers --env production
6161
env:
6262
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
6363
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}

packages/tools/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pnpm runx <command> [options]
2929

3030
Available commands:
3131

32-
- `deploy-published-workers`: Deploy published Workers based packages that changesets marked as published in the current release.
32+
- `deploy-published-workers`: Deploy Cloudflare Workers (based on which packages changesets marked as published in the release).
3333

3434
Note:
3535

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
import { Command } from '@commander-js/extra-typings'
2+
import { validateArg } from '@jahands/cli-tools'
3+
import z from 'zod'
24

35
import { getPublishedPackages } from '../changesets'
46

57
export const deployPublishedWorkersCmd = new Command('deploy-published-workers')
68
.description(
7-
'Deploy Cloudflare Workers to production (based on which packages changesets marked as published in the release)'
9+
'Deploy Cloudflare Workers (based on which packages changesets marked as published in the release)'
810
)
9-
.action(async () => {
11+
.requiredOption(
12+
'-e, --env <staging|production>',
13+
'The environment to deploy to',
14+
validateArg(z.enum(['staging', 'production']))
15+
)
16+
.action(async ({ env }) => {
1017
const publishedPackages = await getPublishedPackages()
1118

1219
// This technically includes all versioned packages (including non-Workers),
@@ -15,5 +22,5 @@ export const deployPublishedWorkersCmd = new Command('deploy-published-workers')
1522

1623
await $({
1724
verbose: true,
18-
})`turbo deploy ${filters}`
25+
})`turbo deploy ${filters} -- --env ${env}`
1926
})

0 commit comments

Comments
 (0)