Files
getsentry__sentry-for-ai/.github/workflows/release-build.yml
Evan Purkhiser 89c55f0d3d ci(installer): publish @sentry/ai to npm via craft (#185)
Add the Craft release pipeline so packages/installer can be published to
npm as @sentry/ai.

- .craft.yml configures a single npm target (public scoped access) with a
  tarball-name guard. There is deliberately no github target, so a release
  creates no git tags and no GitHub releases -- nothing repo-wide implying
  the skills/plugins are versioned by it.
- The release branch is scoped to `release-installer/<version>` via
  releaseBranchPrefix, so it reads as a package release. craft creates it
  during prepare and deletes it after publish, so it is transient.
- changelogPolicy is `simple` (matching sentry-javascript) and the
  changelog lives with the package at packages/installer/CHANGELOG.md. The
  entry is written by hand before releasing; `auto` would sweep this repo's
  skill-drift and plugin churn into the installer changelog.
- release.yml runs `craft prepare` via the Sentry release bot App token.
  It must be an App token rather than GITHUB_TOKEN so the pushed release
  branch triggers release-build.yml, which packs the tarball and uploads
  it as the SHA-named artifact Craft's GitHub provider expects.
- The package gains `files: ["dist", "CHANGELOG.md"]`, publishConfig.access
  public, and an explicit LICENSE so the published tarball is complete
  without relying on pnpm copying the root LICENSE.

Publishing runs from getsentry/publish after a team lead approves the
release issue; this repo only prepares the release and builds the artifact.
2026-06-17 15:14:05 -04:00

42 lines
1.1 KiB
YAML

# Packs the installer tarball on release branches. Artifact name must be the
# commit SHA -- that's what craft downloads at publish time.
name: Release Build
on:
push:
branches:
- release-installer/**
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: pnpm/action-setup@a15d269cd4658e1107c09f1fabf4cbd7bd1f308a # v4.4.0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 24
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Build
run: pnpm --filter @sentry/ai build
- name: Pack tarball
working-directory: packages/installer
run: pnpm pack --pack-destination "${{ github.workspace }}"
- name: Upload release artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ github.sha }}
path: "*.tgz"
if-no-files-found: error