From 8c259ee26af06364eea16109779879c5c852ec7c Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Wed, 11 Feb 2026 13:37:09 +0000 Subject: [PATCH 1/2] docs(develop): Replace deprecated action-prepare-release with Craft v2 Update the SDK releases guide to reflect changes from getsentry/publish. - Replace `getsentry/action-prepare-release@v1` with `getsentry/craft@v2` composite action in all workflow examples - Update `actions/checkout` from v3 to v4 - Add CalVer section with new `.craft.yml` config - Add Merge Target section showing `merge_target` input usage - Add links to Craft GitHub Actions docs throughout - Remove outdated example PR links that referenced the old action - Explain why manual Sentry Release Bot token is needed for getsentry repos Co-Authored-By: Claude --- develop-docs/sdk/processes/releases.mdx | 58 ++++++++++++++++++++----- 1 file changed, 47 insertions(+), 11 deletions(-) diff --git a/develop-docs/sdk/processes/releases.mdx b/develop-docs/sdk/processes/releases.mdx index 5fb3bcffdc0dd..c6d0a8cc82faa 100644 --- a/develop-docs/sdk/processes/releases.mdx +++ b/develop-docs/sdk/processes/releases.mdx @@ -85,7 +85,9 @@ Nice! This file is used to trigger the release from the GitHub UI. You'll notice it uses `vars.SENTRY_RELEASE_BOT_CLIENT_ID` and `secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY` -- these should be -available to your repository automatically! +available to your repository automatically! These are needed because +[GitHub prevents `GITHUB_TOKEN` from triggering downstream workflows](https://docs.github.com/en/actions/reference/events-that-trigger-workflows), +which is required for creating publish request issues in `getsentry/publish`. ```yaml name: Release @@ -95,7 +97,7 @@ on: inputs: version: description: Version to release - required: true + required: false force: description: Force a release even when there are release-blockers (optional) required: false @@ -111,12 +113,12 @@ jobs: with: app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }} private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: token: ${{ steps.token.outputs.token }} fetch-depth: 0 - name: Prepare release - uses: getsentry/action-prepare-release@v1 + uses: getsentry/craft@v2 env: GITHUB_TOKEN: ${{ steps.token.outputs.token }} with: @@ -124,15 +126,16 @@ jobs: force: ${{ github.event.inputs.force }} ``` +For full details on all available options including auto-versioning, changelog preview, +and more, see [Craft's GitHub Actions documentation](https://craft.sentry.dev/github-actions/). +If your repository is outside the `getsentry` organization, you can use the simpler +[reusable workflow](https://craft.sentry.dev/github-actions/#option-1-reusable-workflow-recommended) +which handles token management automatically via `secrets: inherit`. + ### Commit + PR **Commit those three files and make a pull request.** -Here's [an example PR] and the [follow-up to fix `fetch-depth`]. - -[an example PR]: https://github.com/getsentry/uwsgi-dogstatsd-plugin/pull/2 -[follow-up to fix `fetch-depth`]: https://github.com/getsentry/uwsgi-dogstatsd-plugin/pull/3 - ## Setting Up Permissions Give the following teams access to your repository: @@ -158,6 +161,37 @@ add a label to. [issue in `publish`]: https://github.com/getsentry/publish/issues +## Calendar Versioning (CalVer) + +To enable calendar versioning for your SDK, add the following to your `.craft.yml`: + +```yaml +versioning: + policy: calver + calver: + format: "%y.%-m" # e.g., 24.12 for December 2024 + offset: 14 # Days to look back for date calculation (optional) +``` + +See the [Craft CalVer documentation](https://craft.sentry.dev/configuration/#calendar-versioning-calver) for more details. + +## Merge Target + +By default, all releases are merged to the default branch of your repository (usually `main`). To override this, pass the `merge_target` input in your release workflow: + +```yaml +- name: Prepare release + uses: getsentry/craft@v2 + env: + GITHUB_TOKEN: ${{ steps.token.outputs.token }} + with: + version: ${{ github.event.inputs.version }} + merge_target: ${{ github.event.inputs.merge_target }} +``` + +Make sure to also add a `merge_target` input to your workflow's `workflow_dispatch.inputs` block. +The same input is available in the [reusable workflow](https://craft.sentry.dev/github-actions/#option-1-reusable-workflow-recommended) as well. + ## Version name conventions To keep versioning consistent across SDKs, we generally follow [semantic versioning (semver)](https://semver.org/), with language- or platform-specific conventions around semver (if applicable). @@ -227,7 +261,7 @@ You can opt your repo into using the config from a specific merge target branch ### 1. Release Preparation: -Add `craft_config_from_merge_target: true` when calling `getsentry/action-prepare-release` in your repo's release workflow: +Add `craft_config_from_merge_target: true` when calling `getsentry/craft` in your repo's release workflow: ```yml # ... @@ -238,12 +272,14 @@ jobs: steps: # ... - name: Prepare release - uses: getsentry/action-prepare-release@v1 + uses: getsentry/craft@v2 with: # ... craft_config_from_merge_target: true ``` +This input is also available in the [reusable workflow](https://craft.sentry.dev/github-actions/#option-1-reusable-workflow-recommended). + ### 2. Publish Configuration Add the branch(es) you want to take the config from to the `publish.yml` workflow in `getsentry/publish`: From dcb3c66cf2941cf0f8d57e1a15524a13233f6e50 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Wed, 11 Feb 2026 14:39:54 +0000 Subject: [PATCH 2/2] Apply suggestion from @BYK --- develop-docs/sdk/processes/releases.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/develop-docs/sdk/processes/releases.mdx b/develop-docs/sdk/processes/releases.mdx index c6d0a8cc82faa..5146274ec1898 100644 --- a/develop-docs/sdk/processes/releases.mdx +++ b/develop-docs/sdk/processes/releases.mdx @@ -113,7 +113,7 @@ jobs: with: app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }} private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: token: ${{ steps.token.outputs.token }} fetch-depth: 0