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..ff552558 --- /dev/null +++ b/.github/workflows/release-client.yml @@ -0,0 +1,39 @@ +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 + merge_target: + description: Target branch to merge into. Uses the default branch as a fallback (optional) + required: false + +jobs: + release: + runs-on: ubuntu-latest + 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 }} + + - 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/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..e69de29b diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh new file mode 100644 index 00000000..937e7a2a --- /dev/null +++ b/scripts/bump-version.sh @@ -0,0 +1,25 @@ +#!/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" + +# =================== 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"