Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .craft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
minVersion: 3.3.0

# Each workspace is released on its own, with its own version, tags, release
# branch and changelog. Pick one with `--workspace <path>` or `CRAFT_WORKSPACE`.
#
# A workspace's changelog lists every PR that changes its directory or one of
# its `includePaths`. Files outside all workspaces (root config, CI, docs, ...)
# are excluded everywhere. Entries are grouped by the categories in
# `.github/release.yml`, which all workspaces share.
workspaces:
clients/python:
releaseBranchPrefix: release-py
preReleaseCommand: scripts/bump-version-py-client.sh
changelog:
policy: auto
scopeGrouping: false
unownedPaths: exclude
targets:
- name: github
tagPrefix: py-client@
- name: pypi
- name: sentry-pypi
internalPypiRepo: getsentry/pypi
requireNames:
- /.*objectstore_client.*whl$/
- /.*objectstore_client.*tar\.gz$/

clients/rust:
releaseBranchPrefix: release-rust
preReleaseCommand: scripts/bump-version-rs-client.sh
changelog:
policy: auto
scopeGrouping: false
unownedPaths: exclude
# The crates target publishes from source, so there are no build artifacts.
artifactProvider:
name: none
targets:
- name: github
tagPrefix: rs-client@
- name: crates

objectstore-server:
releaseBranchPrefix: release
preReleaseCommand: scripts/bump-version-server.sh
versioning:
policy: calver
changelog:
policy: auto
scopeGrouping: false
unownedPaths: exclude
# The server crate and the storage service, which hold nearly all
# server behavior. Changes to the other crates the server is built from
# aren't listed.
includePaths:
- objectstore-service
Comment thread
cursor[bot] marked this conversation as resolved.
artifactProvider:
name: none
targets:
- name: github
# Without a prefix, Craft would take the nearest client tag as the
# previous server release and start the changelog there.
tagPrefix: server@
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Changelog categories for this client. Keep in sync with the other client's
# `.github/release.yml`.
# Changelog categories for every Craft workspace in `.craft.yml`.
#
# A custom file replaces Craft's defaults entirely. It groups entries by change
# type, strips the `type(scope):` prefix, and catches every remaining change so
Expand Down
21 changes: 0 additions & 21 deletions .github/workflows/changelog-preview-python.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/changelog-preview-rust.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/workflows/changelog-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Changelog Preview

on:
pull_request_target:
types: [opened, synchronize, reopened, edited, labeled, unlabeled]

permissions:
contents: read
pull-requests: write

jobs:
changelog-preview:
# Posts one comment listing every workspace in `.craft.yml` whose
# changelog lists this PR, with its bump.
uses: getsentry/craft/.github/workflows/changelog-preview.yml@4a8dba2a45b09f4e3fcfc86a79c94d0dd93295bb # 3.4.0
with:
craft-version: 3.4.0
Comment thread
sentry-junior[bot] marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
name: Release client library
name: Release

on:
workflow_dispatch:
inputs:
client:
description: Client to release
workspace:
description: Craft workspace to release
required: true
type: choice
options:
- python
- rust
- clients/python
- clients/rust
- objectstore-server
version:
description: Version to release
required: true
description: Exact version, bump type (major, minor, patch), or auto. Leave blank for auto (clients) or CalVer (server)
required: false
force:
description: Force a release even when there are release-blockers (optional)
required: false
Expand Down Expand Up @@ -41,11 +42,11 @@ jobs:
- uses: astral-sh/setup-uv@5a7eac68fb9809dea845d802897dc5c723910fa3 # v7.1.3

- name: Prepare release
uses: getsentry/action-prepare-release@3cea80dc3938c0baf5ec4ce752ecb311f8780cdc # v1.6.4
uses: getsentry/craft@4b763f5419255bb520e3e5a49f5b91426dcd374d # 3.3.0
env:
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
with:
version: ${{ github.event.inputs.version }}
force: ${{ github.event.inputs.force }}
merge_target: ${{ github.event.inputs.merge_target }}
path: clients/${{ github.event.inputs.client }}
workspace: ${{ inputs.workspace }}
version: ${{ inputs.version }}
force: ${{ inputs.force }}
merge_target: ${{ inputs.merge_target }}
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ cargo doc --workspace --all-features --no-deps --document-private-items

## Pull Requests

The Python and Rust clients are released separately, each with its own changelog (`clients/python/CHANGELOG.md`, `clients/rust/CHANGELOG.md`). When making a change that touches one of the clients, consider the user-facing changelog entry, which is generated from PR titles:
The Python client, the Rust client and the server are released separately as Craft workspaces (see `.craft.yml`), each with its own changelog (`clients/python/CHANGELOG.md`, `clients/rust/CHANGELOG.md`, `objectstore-server/CHANGELOG.md`). Changelog entries are generated from PR titles:

- A PR is listed in the changelog of every client whose directory it changes, grouped by the conventional commit type of its title (`feat`, `fix`, ...). The scope doesn't matter.
- If the title doesn't describe the change well for client users, add a `### Changelog Entry` section to the PR description with the text to use instead. It's used for every client the PR touches.
- A PR is listed in the changelog of every workspace whose files it changes, grouped by the conventional commit type of its title (`feat`, `fix`, ...). The scope doesn't matter. The server's changelog also covers `objectstore-service` (`includePaths` in `.craft.yml`); files outside all workspaces aren't listed anywhere.
- If the title doesn't describe the change well for users, add a `### Changelog Entry` section to the PR description with the text to use instead. It's used for every changelog the PR is listed in.
17 changes: 0 additions & 17 deletions clients/python/.craft.yml

This file was deleted.

14 changes: 0 additions & 14 deletions clients/rust/.craft.yml

This file was deleted.

29 changes: 0 additions & 29 deletions clients/rust/.github/release.yml

This file was deleted.

1 change: 1 addition & 0 deletions objectstore-server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Changelog
17 changes: 17 additions & 0 deletions scripts/bump-version-server.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
set -euxo pipefail

ROOT_DIR="$(realpath $(dirname "$0")/..)"

OLD_VERSION="${1}"
NEW_VERSION="${2}"

echo "Current version: $OLD_VERSION"
echo "Bumping to version: $NEW_VERSION"

cd $ROOT_DIR
cd objectstore-server
perl -pi -e "s/^version = \".*?\"/version = \"$NEW_VERSION\"/" Cargo.toml

cd $ROOT_DIR
cargo metadata --format-version 1 >/dev/null # update `Cargo.lock`
Loading