chore(ci): authenticate Trigger.dev deploys with per-environment API keys
Merged
WA
1d ago+39+39+01234567890123456789-47-47-01234567890123456789
Summary
- Trigger.dev deploy and promote jobs read
TRIGGER_ACCESS_TOKENfrom an environment-scoped secret:TRIGGER_ACCESS_TOKEN_PRODonmain,TRIGGER_ACCESS_TOKEN_STAGINGonstaging,TRIGGER_ACCESS_TOKEN_PREVIEWfor thedevpreview branch - Each falls back to the existing shared
TRIGGER_ACCESS_TOKEN, so deploys keep working until the new secrets exist; the empty-token guards still fail fast - Environment API keys with Deploy only access belong to the project environment, not to a member, so they survive org membership changes (a personal access token does not)
- Bumps the
trigger.devCLI and@trigger.dev/{sdk,core,build}from 4.5.16 to 4.7.6 (CLI and packages must match or the CLI aborts in CI):- 4.5.11 added env API keys for
deploy, butpromoteonly accepts them from 4.7.0 - From 4.7.5 a
--envthat doesn't match the key's environment is an error; before, the deploy silently went to the key's environment - 4.7.6 is the newest release past the 7-day
minimumReleaseAge
- 4.5.11 added env API keys for
- Promote needs the same
write:deploymentsscope as deploy, so a Deploy only key covers both
Type of Change
- Chore (CI / dependency)
Testing
actionlinton both workflows (no new findings)- Read the 4.5.16 → 4.7.6 changelogs for the CLI, SDK, core, and build: the changes are additive or limited to
chat.agent, which this repo doesn't use;runtimeis pinned tonode-24, so the 4.7.2 default-runtime change doesn't apply; thezodoverride keeps 4.3.6 - CI type-check, tests, and audits on this PR; the deploy path itself first runs on the next push to
staging
Checklist
- Code follows project style guidelines
- Self-reviewed my changes
- Tests added/updated and passing (new tests pass the
test-auditauthoring gate) - No new warnings introduced
- I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)