Dashboard › craft › Distillation
83a52e94-5fc1-40f5-a623-837a000ca551["lore_tm_v1_tAqg4C_Pk2ebNMoQh75Xna5HDPE40_hwaNuLMb2x9zE","lore_tm_v1_IkumFWZFDtGnpLXMI89JBQ6LODhZybCFjt9h6tf64WU","lore_tm_v1_7UgtWPjEY18Fk7nHUdIpUnRsbKRSyQeiHXwVG9d0qtA","lore_tm_v1_Aifys1e5jTm8qlsMobH-hzQgyAFuMrQNIw_-q4RC4QU","lore_tm_v1_Mz0eGTKGXbnQXhRm4KDm2f_TA-8kgy2G35Xvy859wi4","lore_tm_v1_CmJTAMJMcHaQCJFdsL0mW8JwhNfmYbJPwgZV_bN6e8I"]
Date: Sep 8, 2026
commitChanges() commits only explicitly staged files such as the changelog, so stray working-tree changes are never swept in by accident.execPublish() will never return: it terminates the process with the corresponding error code after publishing is done.Switched to branch "${branchName}" after git.checkoutBranch(branchName, rev).@-mentions with bold formatting in the changelog destined for publish issues, avoiding contributor pings while retaining original mentions in committed CHANGELOG.md.action.yml defines composite action Craft Prepare Release, with optional craft_version input (default ''): explicit tag or "latest"; otherwise defaults to ${{ github.action_ref }} such as "v2". It outputs version, branch, sha, previous_tag, changelog, changelog_file, and issue_url.action.yml installation decision: for github.repository == 'getsentry/craft', uses actions/download-artifact@v8 to download craft-binary to /tmp/craft-artifact and installs /tmp/craft-artifact/dist/craft; otherwise, or if unavailable, downloads the Craft release binary. A specified unavailable version falls back to GitHubβs latest release; an empty URL or empty/missing /usr/local/bin/craft errors.action.yml Craft Prepare and Read Craft Targets explicitly run unset CRAFT_WORKSPACE, then pass optional workspace only through --workspace=$WORKSPACE. Craft Prepare calls git remote set-head origin --auto, conditionally adds --config-from "$MERGE_TARGET" when CRAFT_CONFIG_FROM_MERGE_TARGET == 'true', and runs craft prepare "${VERSION_ARG[@]}" "${CRAFT_ARGS[@]}".action.yml formats craft targets JSON output as Markdown target checkboxes using jq -r '.[]|" - [ ] \(.)"', then writes it as multiline targets to $GITHUB_OUTPUT.action.yml request-publish behavior: resolves PUBLISH_REPO=self to $GITHUB_REPOSITORY; reads changelog from CHANGELOG_FILE to avoid Linux ARG_MAX/E2BIG; truncates changelog bodies over MAX_CHANGELOG_CHARS=60000 with --- and *Changelog truncated for issue body.*; and constructs title publish: ${GITHUB_REPOSITORY}${SUBDIRECTORY}${WORKSPACE:+/$WORKSPACE}@${RESOLVED_VERSION}.action.yml locates an existing publish issue by exact title via gh -R "$PUBLISH_REPO" issue list --json title,url,number,body, selecting the first most-recent matching open issue rather than using GitHub search API to avoid indexing delays and query-syntax edge cases. It preserves checked [x]/[X] target states only from the existing ### Targets section, updates the existing issue body if permitted, otherwise retains the existing issue, or creates a new issue with gh issue create.Requested by: @${GITHUB_ACTOR}, include merge target, compare/check-run links, require the **accepted** label for approval, list targets, and state that checked targets are skipped and can be unchecked to retry.src/commands/prepare.ts checkVersionOrPart() accepts omitted version, "auto", "calver", bump types "major", "minor", "patch", and valid semver. Invalid versions throw Invalid version or version part specified: "<version>", adding advice to remove a leading "v" prefix.src/commands/prepare.ts release branch creation uses ${releaseBranchPrefix || DEFAULT_RELEASE_BRANCH_NAME}/${newVersion}; if git.raw('show-ref', '--heads', branchName) finds it, reports deletion commands git branch -D ${branchName}; git push ${remoteName} --delete ${branchName}. Otherwise it checks out the branch from rev and logs creation/switching.src/commands/prepare.ts commitChanges() decision: if a pre-release command or automatic bump ran, it requires created, modified, or staged changes and commits with git.commit(message, ['--all']); if none ran, it returns unless repoStatus.staged.length || repoStatus.created.length, then calls git.commit(message) without --all.src/commands/prepare.ts pre-release priority is custom preReleaseCommand first; automatic target version bumping second when minVersion >= 2.21.0 and targets exist; default scripts/bump-version.sh last. An explicitly empty command logs a warning and does nothing. Commands receive allowlisted environment variables plus CRAFT_NEW_VERSION and CRAFT_OLD_VERSION; empty old versions become "0.0.0".src/commands/prepare.ts execPublish() waits SLEEP_BEFORE_PUBLISH_SECONDS = 30 unless dry-run, then calls publishMainHandler() with keepBranch: false, keepDownloads: false, noMerge: false, noStatusCheck: false, and inherited remote, newVersion, noGitChecks; successful publishing calls process.exit(0), while failure logs manual fallback craft publish ${newVersion} and rethrows.src/commands/prepare.ts prepareChangelog() supports ChangelogPolicy.None, Auto, and Simple; Auto creates a missing changelog with # Changelog\n, generates missing release entries from Git, and replaces an unreleased section. It rejects invalid policies, paths whose relative form starts with ., a missing Simple changelog, and absent Simple version entries.src/commands/prepare.ts getChangelogLineRange() reads HEAD:${changelogPath}, finds either ## ${version} ATX or ${version} setext headers, detects the next level-2 heading or EOF, trims trailing blank lines, returns fragments such as #L{start}-L{end}, and returns '' on any failure.prepareMain() warns that --config-from executes an attacker-influenceable remote .craft.yml preReleaseCommand and requires callers to trust the specified branch. It fetches argv.remote/argv.configFrom, loads ${argv.remote}/${argv.configFrom}:${CONFIG_FILE_NAME}, resolves repository root with git.revparse(['--show-toplevel']), and wraps errors as Failed to load .craft.yml from branch "<branch>": <error>.prepareMain() resolves omitted versions from versioning.policy; Manual policy requires an explicit version, while "calver", "auto", and bump types require minVersion >= 2.14.0. CalVer offset precedence is CLI --calver-offset, then CRAFT_CALVER_OFFSET, then config, then DEFAULT_CALVER_CONFIG.offset; automatic versions derive a bump from commits and the latest tag, defaulting current version to 0.0.0.prepareMain() creates dry-run isolation, creates the release branch before reading oldVersion because release ordering matters, explicitly stages changelog changes, runs pre-release/version bumping, commits, previews isolation diff, pushes unless --no-push, and emits GitHub Actions outputs version, branch, sha, and previous_tag.prepareMain() writes full issue changelog through writeGitHubActionsFile('changelog', issueChangelog) to avoid action environment-variable E2BIG, builds a GitHub release-branch changelog permalink with optional line range, and writes truncated changelog output with truncateForOutput(issueChangelog, changelogFileUrl).prepareMain() with --publish logs a dry-run command when isolated; otherwise announces the pushed release branch and invokes execPublish(). Without --publish, it reminds users to run craft publish ${newVersion}. After non-isolated releases without an explicit --rev, it switches back to the default branch; isolation.cleanup() runs in finally.package.json identifies the project as @sentry/craft version 2.31.0-dev.0, repository https://github.com/getsentry/craft, MIT-licensed βThe universal sentry workflow CLIβ; both craft and sentry-craft binaries point to dist/craft.build:fat runs tsc -p tsconfig.build.json; build runs node build.mjs; precli runs pnpm build; cli runs node -r source-map-support/register dist/craft; lint runs eslint --cache --cache-strategy content; test runs vitest run; typecheck runs tsc --noEmit; documentation scripts run cd docs && pnpm dev or pnpm build.package.json uses Volta-pinned Node 24.18.0 and pnpm 10.27.0; notable dev dependencies include glob ^11.0.0, simple-git ^3.33.0, typescript ^5.7.2, vitest ^4.1.0, yargs ^18, and zod ^3.24.1.tsconfig.json extends ./tsconfig.build.json, enables types ["node", "vitest/globals"], incremental: true, and tsBuildInfoFile: ".tsbuildinfo"; includes src/**/*.ts, **/__mocks__/**/*.ts, and **/__tests_/**/*.ts, while excluding dist/**/*.