Skip to content

Commit 29c604d

Browse files
authored
fix(ci): bake the CLI telemetry token into the build that bun publish ships (#7790)
1 parent 8e2623d commit 29c604d

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/publish-sim-cli.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ concurrency:
1515

1616
jobs:
1717
publish-npm:
18+
# Job-level, not on the build step: `bun publish` runs `prepublishOnly`,
19+
# which rebuilds `dist` a second time, and that second build is the one
20+
# that ships. A build without the token reports nothing. See
21+
# docs/cli/usage-data.
22+
env:
23+
SIM_CLI_TELEMETRY_KEY: ${{ vars.SIM_CLI_TELEMETRY_KEY }}
24+
SIM_CLI_TELEMETRY_HOST: ${{ vars.SIM_CLI_TELEMETRY_HOST }}
1825
runs-on: ${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == 'blacksmith') && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
1926
timeout-minutes: 15
2027
steps:
@@ -63,11 +70,6 @@ jobs:
6370

6471
- name: Build package
6572
working-directory: packages/sim-cli
66-
env:
67-
# Public PostHog project token for anonymous CLI usage reporting; a
68-
# build without it reports nothing. See docs/cli/usage-data.
69-
SIM_CLI_TELEMETRY_KEY: ${{ vars.SIM_CLI_TELEMETRY_KEY }}
70-
SIM_CLI_TELEMETRY_HOST: ${{ vars.SIM_CLI_TELEMETRY_HOST }}
7173
run: bun run build
7274

7375
- name: Resolve release channel

0 commit comments

Comments
 (0)