diff --git a/.craft.yml b/.craft.yml index b05d880..eeff9c7 100644 --- a/.craft.yml +++ b/.craft.yml @@ -1,6 +1,10 @@ minVersion: "3.9.0" changelog: policy: auto + # Add a short AI summary above the entries of each release. The Release + # workflow gives Craft the workflow token for it. + aiSummary: + levels: [release] # Write the version only to `@sentry/roach` (packages/roach/package.json). # See the script for why Craft does not do it on its own. preReleaseCommand: sh .github/scripts/bump-version.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2d6e753..4c31dda 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,15 +5,21 @@ name: Release on: workflow_dispatch: inputs: - version: - description: Version bump type + bump: + description: Version bump type (ignored when version is set). auto picks it from the commits; pre cuts a prerelease of that version. required: true type: choice - default: minor + default: auto options: - - minor + - auto + - pre - patch + - minor - major + version: + description: Exact version override (for example, 0.212.0) + required: false + type: string force: description: Force release (bypass blockers) required: false @@ -22,6 +28,8 @@ on: permissions: contents: read + # Craft writes AI changelog summaries with the workflow token. + copilot-requests: write jobs: release: @@ -50,9 +58,10 @@ jobs: run: .github/scripts/drop-floating-tags.sh - name: Prepare release - uses: getsentry/craft@2e29b0819113d334c15da3d8cac2138cb9dc111a # 3.9.0 + uses: getsentry/craft@v3 env: GITHUB_TOKEN: ${{ steps.token.outputs.token }} with: - version: ${{ inputs.version }} + version: ${{ inputs.version || inputs.bump }} force: ${{ inputs.force && 'true' || 'false' }} + llm_api_key: ${{ github.token }} diff --git a/README.md b/README.md index a58e1e0..8db4198 100644 --- a/README.md +++ b/README.md @@ -958,14 +958,18 @@ does not exist does. ## Release -Run the `Release` workflow, and choose `minor`, `patch`, or `major`. Craft -(`.craft.yml`) makes a `release/` branch and asks for approval in +Run the `Release` workflow. Choose a `bump`: `auto` (the default), `pre`, +`patch`, `minor`, or `major`. `auto` picks the bump from the commits. `pre` +makes a prerelease of the version that `auto` picks. To release an exact +version, type it in `version`. Craft (`.craft.yml`) makes a +`release/` branch and asks for approval in [getsentry/publish](https://github.com/getsentry/publish). When a release manager accepts it, Craft: - copies the image `ghcr.io/getsentry/roach:` to `:`. - makes the GitHub release `v`, with the changelog, and moves the - `v` tag. Repositories use the action as `getsentry/roach@v`. + `v` tag. When the changelog has more than 5 entries, Craft adds a + short AI summary above them. Repositories use the action as `getsentry/roach@v`. - publishes `@sentry/roach` to npm: the tarball that the `package` job of `CI` uploads for the release commit. Craft publishes only `sentry-roach-.tgz`, and CI makes sure that it has `LICENSE` and