$ show getsentry/action-release
This is a GitHub Action that automates creating releases in Sentry (error monitoring platform). The action wraps the `@sentry/cli` tool and runs as either a Docker container on Linux runners or a composite action installing the CLI on macOS/Windows. Its core workflow (in `src/main.ts`) parses inputs, validates environment variables, then orchestrates a sequence of sentry-cli calls: creating a release, optionally setting commits (auto/skip/manual), injecting debug IDs into source files, uploading source maps, deploying to an environment, and finalizing the release. Telemetry via `@sentry/node` is collected to monitor action performance. The codebase is small (5 source files plus tests), cleanly structured, and well-tested with both unit tests and end-to-end integration tests against Sentry's API. It is actively maintained with recent dependency bumps and proper CI/CD pipelines.
The LLM identified 2 files worth highlighting for reuse:
Provides robust parsing of GitHub Action inputs with type coercion, fallback logic, deprecation handling (e.g., `release` overrides deprecated `version`), and safe boolean extraction from string environment variables. The `getRelease` function demonstrates a clean pattern for computing a default via CLI if not user-provided, respecting prefixes without side effects. While coupled to `@actions/core` and the `getCLI` singleton, the core validation and option-parsing logic could be extracted and reused in other GitHub Actions that need similar input handling with backward compatibility.
Implements a reusable telemetry wrapper pattern: initializes Sentry SDK conditionally, wraps a callback in a transaction span, sets user/tags from environment, updates progress tags, and safely flushes on completion. The `traceStep` function provides per-step instrumentation useful for profiling any sequential workflow. Although it references the repo's own `options` module, the core pattern of initializing a telemetry SDK, wrapping async execution, and handling flush failures gracefully is transferable to any automation tool that needs to instrument its own execution.