From b733c48c111ebdca8f396594169387bbe1b161ad Mon Sep 17 00:00:00 2001 From: lcian <17258265+lcian@users.noreply.github.com> Date: Thu, 30 Oct 2025 13:43:53 +0100 Subject: [PATCH 1/7] meta(client): Release setup --- .craft.yml | 19 +++++++++++++++ .github/workflows/release-client.yml | 36 ++++++++++++++++++++++++++++ scripts/bump-version.sh | 29 ++++++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 .craft.yml create mode 100644 .github/workflows/release-client.yml create mode 100644 scripts/bump-version.sh diff --git a/.craft.yml b/.craft.yml new file mode 100644 index 00000000..e12bdc90 --- /dev/null +++ b/.craft.yml @@ -0,0 +1,19 @@ +changelogPolicy: auto + +targets: + - name: github + + - name: crates + includeNames: /^objectstore-client$/ + + - name: pypi + includeNames: /^dist\/.*/ + + - name: sentry-pypi + includeNames: /^dist\/.*/ + internalPypiRepo: getsentry/pypi + +requireNames: + - /^objectstore-client$/ + - /^dist\/.*.whl$/ + - /^dist\/.*.tar.gz$/ diff --git a/.github/workflows/release-client.yml b/.github/workflows/release-client.yml new file mode 100644 index 00000000..6807dca1 --- /dev/null +++ b/.github/workflows/release-client.yml @@ -0,0 +1,36 @@ +name: Release client libraries + +on: + workflow_dispatch: + inputs: + version: + description: Version to release + required: true + force: + description: Force a release even when there are release-blockers (optional) + required: false + +jobs: + release: + runs-on: ubuntu-latest + name: "Release a new version of the Objectstore client libraries" + steps: + - uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4 + with: + app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }} + private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} + + - uses: actions/checkout@v5 + with: + token: ${{ steps.token.outputs.token }} + fetch-depth: 0 + + - uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2 + + - name: Prepare release + uses: getsentry/action-prepare-release@v1 + env: + GITHUB_TOKEN: ${{ steps.token.outputs.token }} + with: + version: ${{ github.event.inputs.version }} + force: ${{ github.event.inputs.force }} diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh new file mode 100644 index 00000000..4e7b7d7b --- /dev/null +++ b/scripts/bump-version.sh @@ -0,0 +1,29 @@ +#!/bin/bash +set -euxo pipefail + +env + +exit 1 + +#ROOT_DIR="$(realpath $(dirname "$0")/..)" +# +#OLD_VERSION="${1}" +#NEW_VERSION="${2}" +# +#echo "Current version: $OLD_VERSION" +#echo "Bumping to version: $NEW_VERSION" +# +## =================== Rust =================== +# +#cd $ROOT_DIR +#cd objectstore-client +# +#perl -pi -e "s/^version = \".*?\"/version = \"$NEW_VERSION\"/" Cargo.toml +#cargo metadata --format-version 1 >/dev/null # update `Cargo.lock` +# +## ==================== PY ==================== +# +#cd $ROOT_DIR +#cd python-objectstore-client +# +#uv version "$NEW_VERSION" From 06202c31119b13bbbad057d434ae077bad93140d Mon Sep 17 00:00:00 2001 From: lcian <17258265+lcian@users.noreply.github.com> Date: Thu, 30 Oct 2025 13:56:54 +0100 Subject: [PATCH 2/7] temporarily add trigger --- .github/workflows/release-client.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release-client.yml b/.github/workflows/release-client.yml index 6807dca1..fcaf96e4 100644 --- a/.github/workflows/release-client.yml +++ b/.github/workflows/release-client.yml @@ -1,6 +1,10 @@ name: Release client libraries on: + # temporary + pull_request: + types: [labeled] + workflow_dispatch: inputs: version: From e13fd7b3cd4a7b61638c3c949f0cb269dd3c1a8f Mon Sep 17 00:00:00 2001 From: lcian <17258265+lcian@users.noreply.github.com> Date: Thu, 30 Oct 2025 13:58:34 +0100 Subject: [PATCH 3/7] token --- .github/workflows/release-client.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-client.yml b/.github/workflows/release-client.yml index fcaf96e4..4338665f 100644 --- a/.github/workflows/release-client.yml +++ b/.github/workflows/release-client.yml @@ -17,9 +17,9 @@ on: jobs: release: runs-on: ubuntu-latest - name: "Release a new version of the Objectstore client libraries" steps: - uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4 + id: token with: app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }} private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} From ad3bbd2c384225bb3a8ebcc69ba33d669495382d Mon Sep 17 00:00:00 2001 From: lcian <17258265+lcian@users.noreply.github.com> Date: Thu, 30 Oct 2025 14:07:45 +0100 Subject: [PATCH 4/7] add changelog --- CHANGELOG.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..e69de29b From ce0d9cf074f497a62a4b5dbd1bf82e7c06836e7e Mon Sep 17 00:00:00 2001 From: lcian <17258265+lcian@users.noreply.github.com> Date: Thu, 30 Oct 2025 14:17:06 +0100 Subject: [PATCH 5/7] remove temporary trigger --- .github/workflows/release-client.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/release-client.yml b/.github/workflows/release-client.yml index 4338665f..53e4f427 100644 --- a/.github/workflows/release-client.yml +++ b/.github/workflows/release-client.yml @@ -1,10 +1,6 @@ name: Release client libraries on: - # temporary - pull_request: - types: [labeled] - workflow_dispatch: inputs: version: From 3a0e96bd34f047482db62443bc5fab2dd3306af1 Mon Sep 17 00:00:00 2001 From: lcian <17258265+lcian@users.noreply.github.com> Date: Thu, 30 Oct 2025 14:17:32 +0100 Subject: [PATCH 6/7] final script --- scripts/bump-version.sh | 48 +++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh index 4e7b7d7b..937e7a2a 100644 --- a/scripts/bump-version.sh +++ b/scripts/bump-version.sh @@ -1,29 +1,25 @@ #!/bin/bash set -euxo pipefail -env - -exit 1 - -#ROOT_DIR="$(realpath $(dirname "$0")/..)" -# -#OLD_VERSION="${1}" -#NEW_VERSION="${2}" -# -#echo "Current version: $OLD_VERSION" -#echo "Bumping to version: $NEW_VERSION" -# -## =================== Rust =================== -# -#cd $ROOT_DIR -#cd objectstore-client -# -#perl -pi -e "s/^version = \".*?\"/version = \"$NEW_VERSION\"/" Cargo.toml -#cargo metadata --format-version 1 >/dev/null # update `Cargo.lock` -# -## ==================== PY ==================== -# -#cd $ROOT_DIR -#cd python-objectstore-client -# -#uv version "$NEW_VERSION" +ROOT_DIR="$(realpath $(dirname "$0")/..)" + +OLD_VERSION="${1}" +NEW_VERSION="${2}" + +echo "Current version: $OLD_VERSION" +echo "Bumping to version: $NEW_VERSION" + +# =================== Rust =================== + +cd $ROOT_DIR +cd objectstore-client + +perl -pi -e "s/^version = \".*?\"/version = \"$NEW_VERSION\"/" Cargo.toml +cargo metadata --format-version 1 >/dev/null # update `Cargo.lock` + +# ==================== PY ==================== + +cd $ROOT_DIR +cd python-objectstore-client + +uv version "$NEW_VERSION" From 89d71d8e863c402da32ac3ff1c85976742b2b200 Mon Sep 17 00:00:00 2001 From: lcian <17258265+lcian@users.noreply.github.com> Date: Thu, 30 Oct 2025 14:20:38 +0100 Subject: [PATCH 7/7] add merge_target --- .github/workflows/release-client.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release-client.yml b/.github/workflows/release-client.yml index 53e4f427..ff552558 100644 --- a/.github/workflows/release-client.yml +++ b/.github/workflows/release-client.yml @@ -9,6 +9,9 @@ on: force: description: Force a release even when there are release-blockers (optional) required: false + merge_target: + description: Target branch to merge into. Uses the default branch as a fallback (optional) + required: false jobs: release: