Skip to main content
The LogBrew GitHub Action runs at the end of a deploy job. It uploads JavaScript source maps and native debug files for the release. Then it records a deploy marker. LogBrew uses the files to map stack frames to your source. It uses the deploy marker to compare a release with the release before it. The action is in the LogBrewCo/cli repository. It installs the LogBrew CLI from npm, so the runner must have Node.js. GitHub-hosted Linux, macOS, and Windows runners have it.

Create an artifact key

Sign in with the LogBrew CLI and find the project ID:
Create an artifact key for the project. Use a new file path in an owner-only directory:
An artifact key is project-scoped and write-only. It can upload source maps and debug files and record deploys for that project. It cannot read data or send telemetry. Save the contents of the key file as a repository secret named LOGBREW_ARTIFACT_KEY. In GitHub, go to Settings, then Secrets and variables, then Actions. Then delete the local file.

Add the step

Add the action after the step that deploys your app. Pin it to a release tag of the CLI. The tag also selects the CLI version that the action installs.
Use the same release, environment, and service values that your app sends at runtime. See Releases for release names. if: always() makes the step run when the deploy fails, so LogBrew records the failed deploy. The status expression sends failed in that case.

Inputs

The action sets the deployment-id output. For a more exact deploy window, set started-at to the time your deploy step started.

Upload source maps

The sourcemaps input uploads the build that the Vite plugin prepared. Set up the plugin first, see JavaScript source maps. The project must install @logbrew/sdk, because the action runs its upload helper with npx --no-install. Run npm ci before the action. Do not deploy .map files or the manifest to the public website or CDN.

Upload debug files

The debug-files input runs logbrew debug-artifacts upload with the same project, release, environment, and service. See Apple crashes and hangs for dSYM files.

Run the step again

You can send the same deploy ID with the same values again. LogBrew keeps one deploy. The same ID with different values fails. When you run a workflow again, GitHub increases run_attempt. The default ID changes, so the action records a new deploy.

Check the deploy

Read the release with the CLI after the workflow finishes: