Skip to content

Commit a31a374

Browse files
lcianjan-auer
andauthored
meta(client): Release setup (#157)
Co-authored-by: Jan Michael Auer <mail@jauer.org>
1 parent 21f1206 commit a31a374

File tree

8 files changed

+121
-2
lines changed

8 files changed

+121
-2
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Build Python client
2+
3+
on:
4+
push:
5+
branches:
6+
- release/**
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
build:
13+
name: Build and upload artifacts
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
20+
21+
- name: Build artifacts
22+
run: uv build --package objectstore-client
23+
24+
- uses: actions/upload-artifact@v5
25+
with:
26+
path: dist/*
27+
if-no-files-found: 'error'
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release client libraries
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: Version to release
8+
required: true
9+
force:
10+
description: Force a release even when there are release-blockers (optional)
11+
required: false
12+
merge_target:
13+
description: Target branch to merge into. Uses the default branch as a fallback (optional)
14+
required: false
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
release:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
24+
id: token
25+
with:
26+
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
27+
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
28+
29+
- uses: actions/checkout@v5
30+
with:
31+
token: ${{ steps.token.outputs.token }}
32+
fetch-depth: 0
33+
34+
- uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
35+
36+
- name: Prepare release
37+
uses: getsentry/action-prepare-release@v1
38+
env:
39+
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
40+
with:
41+
version: ${{ github.event.inputs.version }}
42+
force: ${{ github.event.inputs.force }}
43+
merge_target: ${{ github.event.inputs.merge_target }}
44+
path: clients

clients/.craft.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
changelogPolicy: auto
2+
preReleaseCommand: ../scripts/bump-version-clients.sh
3+
4+
targets:
5+
- name: github
6+
- name: crates
7+
- name: pypi
8+
- name: sentry-pypi
9+
internalPypiRepo: getsentry/pypi
10+
11+
requireNames:
12+
- /.*objectstore_client.*whl$/
13+
- /.*objectstore_client.*tar\.gz$/

clients/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Unreleased
2+
3+
This is the first release of the Objectstore client SDKs.

clients/python/LICENSE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../LICENSE.md

clients/python/pyproject.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
[project]
22
name = "objectstore-client"
33
version = "0.1.0"
4-
description = "Python client for the Sentry Objectstore service"
4+
description = "Client SDK for Objectstore, the Sentry object storage platform"
55
readme = "README.md"
6+
authors = [
7+
{name = "Sentry", email = "oss@sentry.io"},
8+
]
9+
homepage = "https://getsentry.github.io/objectstore/"
10+
repository = "https://github.com/getsentry/objectstore"
11+
license = { file = "LICENSE.md" }
612
requires-python = ">=3.13.1"
713
dependencies = [
814
"sentry-sdk>=2.42.1",

clients/rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ authors = ["Sentry <oss@sentry.io>"]
44
description = "Client SDK for Objectstore, the Sentry object storage platform"
55
homepage = "https://getsentry.github.io/objectstore/"
66
repository = "https://github.com/getsentry/objectstore"
7-
license-file = "../LICENSE.md"
7+
license-file = "../../LICENSE.md"
88
version = "0.1.0"
99
edition = "2024"
1010
rust-version = "1.89"

scripts/bump-version-clients.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
set -euxo pipefail
3+
4+
ROOT_DIR="$(realpath $(dirname "$0")/..)"
5+
6+
OLD_VERSION="${1}"
7+
NEW_VERSION="${2}"
8+
9+
echo "Current version: $OLD_VERSION"
10+
echo "Bumping to version: $NEW_VERSION"
11+
12+
# =================== Rust ===================
13+
14+
cd $ROOT_DIR
15+
cd clients/rust
16+
17+
perl -pi -e "s/^version = \".*?\"/version = \"$NEW_VERSION\"/" Cargo.toml
18+
cargo metadata --format-version 1 >/dev/null # update `Cargo.lock`
19+
20+
# ==================== PY ====================
21+
22+
cd $ROOT_DIR
23+
cd clients/python
24+
25+
uv version "$NEW_VERSION"

0 commit comments

Comments
 (0)