Skip to content

fix(ci): checkout in sentry-release job; telemetry config as secrets#17

Merged
FedeZara merged 1 commit into
mainfrom
FedeZara/fix-sentry-checkout
May 15, 2026
Merged

fix(ci): checkout in sentry-release job; telemetry config as secrets#17
FedeZara merged 1 commit into
mainfrom
FedeZara/fix-sentry-checkout

Conversation

@FedeZara
Copy link
Copy Markdown
Contributor

Summary

Two small CI fixes for the release pipeline merged in #16.

Changes

fix: actions/checkout in sentry-release job

A real workflow_dispatch run of release.yml for preview@v0.0.1-ci-test failed with:

```
Command failed: sentry-cli ... releases set-commits preview@v0.0.1-ci-test --auto
error: could not find repository at '.'; class=Repository (6); code=NotFound (-3)
```

Root cause: getsentry/action-release@v1 internally runs sentry-cli releases set-commits --auto, which requires a git repository on disk so it can attach the relevant commits to the new Sentry release. The sentry-release job downloaded the bundle artifact but never ran actions/checkout, so the runner's working directory had no git repo.

Fix: add actions/checkout@v4 with fetch-depth: 0 as the first step of the sentry-release job. Full history is cheap (small repo) and gives set-commits --auto enough context to detect commits between releases.

chore: store telemetry config as secrets

Moves POSTHOG_API_KEY, SENTRY_DSN_AUTOMATIONS, and AUTOMATION_EVENT_API_URL from repo vars to secrets. These values are technically write-only at the project level and could be vars, but treating them as secrets keeps them from rendering verbatim in CI logs — light-touch obfuscation only.

SENTRY_ORG (buildwithfern) and SENTRY_PROJECT (automations-actions) remain hardcoded in the workflow — they're not sensitive and don't need to be configurable.

Updates CONTRIBUTING.md's required-configuration table to match.

Test plan

  • actionlint clean
  • Pre-commit hooks (pnpm check + pnpm typecheck) pass
  • After merge, re-dispatch the release workflow with preview@v0.0.1-ci-test (or another throwaway version) and confirm sentry-release runs end-to-end. Set POSTHOG_API_KEY, SENTRY_DSN_AUTOMATIONS, AUTOMATION_EVENT_API_URL, and FERN_SENTRY_AUTH_TOKEN as repo secrets first.

getsentry/action-release@v1 internally runs `sentry-cli releases
set-commits --auto`, which requires a git repository on disk to detect
commits between releases. Without a prior `actions/checkout`, the runner
has only the downloaded artifact in its working directory and sentry-cli
fails with "could not find repository at '.'".

Adds `actions/checkout@v4` with `fetch-depth: 0` so the auto-discovery
has enough history to attach commits to the Sentry release.

Also stores POSTHOG_API_KEY / SENTRY_DSN_AUTOMATIONS / AUTOMATION_EVENT_API_URL
as secrets rather than repo vars — light-touch obfuscation in CI logs.
The values are still safe-to-embed at the project level (write-only Sentry
DSNs and PostHog project keys), but treating them as secrets keeps them
from rendering verbatim in workflow output.
@FedeZara FedeZara requested a review from Swimburger as a code owner May 15, 2026 17:16
@FedeZara FedeZara merged commit a8e6058 into main May 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants