Skip to content

Commit 38eafa2

Browse files
authored
Merge pull request #2 from braintrustdata/release-please--branches--main--changes--next
release: 0.1.0
2 parents 520f7de + f8f706e commit 38eafa2

File tree

10 files changed

+188
-4
lines changed

10 files changed

+188
-4
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow is triggered when a GitHub release is created.
2+
# It can also be run manually to re-publish to Sonatype in case it failed for some reason.
3+
# You can run this workflow by navigating to https://www.github.com/braintrustdata/braintrust-java/actions/workflows/publish-sonatype.yml
4+
name: Publish Sonatype
5+
on:
6+
workflow_dispatch:
7+
8+
release:
9+
types: [published]
10+
11+
jobs:
12+
publish:
13+
name: publish
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- name: Set up Java
20+
uses: actions/setup-java@v3
21+
with:
22+
distribution: temurin
23+
java-version: |
24+
8
25+
17
26+
cache: gradle
27+
28+
- name: Set up Gradle
29+
uses: gradle/gradle-build-action@v2
30+
31+
- name: Publish to Sonatype
32+
run: |
33+
./gradlew publish --stacktrace
34+
env:
35+
SONATYPE_USERNAME: ${{ secrets.BRAINTRUST_SONATYPE_USERNAME || secrets.SONATYPE_USERNAME }}
36+
SONATYPE_PASSWORD: ${{ secrets.BRAINTRUST_SONATYPE_PASSWORD || secrets.SONATYPE_PASSWORD }}
37+
GPG_SIGNING_KEY_ID: ${{ secrets.BRAINTRUST_SONATYPE_GPG_SIGNING_KEY_ID || secrets.GPG_SIGNING_KEY_ID }}
38+
GPG_SIGNING_KEY: ${{ secrets.BRAINTRUST_SONATYPE_GPG_SIGNING_KEY || secrets.GPG_SIGNING_KEY }}
39+
GPG_SIGNING_PASSWORD: ${{ secrets.BRAINTRUST_SONATYPE_GPG_SIGNING_PASSWORD || secrets.GPG_SIGNING_PASSWORD }}

.github/workflows/release-doctor.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release Doctor
2+
on:
3+
pull_request:
4+
workflow_dispatch:
5+
6+
jobs:
7+
release_doctor:
8+
name: release doctor
9+
runs-on: ubuntu-latest
10+
if: github.repository == 'braintrustdata/braintrust-java' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Check release environment
16+
run: |
17+
bash ./bin/check-release-environment
18+
env:
19+
SONATYPE_USERNAME: ${{ secrets.BRAINTRUST_SONATYPE_USERNAME || secrets.SONATYPE_USERNAME }}
20+
SONATYPE_PASSWORD: ${{ secrets.BRAINTRUST_SONATYPE_PASSWORD || secrets.SONATYPE_PASSWORD }}
21+
GPG_SIGNING_KEY_ID: ${{ secrets.BRAINTRUST_SONATYPE_GPG_SIGNING_KEY_ID || secrets.GPG_SIGNING_KEY_ID }}
22+
GPG_SIGNING_KEY: ${{ secrets.BRAINTRUST_SONATYPE_GPG_SIGNING_KEY || secrets.GPG_SIGNING_KEY }}
23+
GPG_SIGNING_PASSWORD: ${{ secrets.BRAINTRUST_SONATYPE_GPG_SIGNING_PASSWORD || secrets.GPG_SIGNING_PASSWORD }}

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.1.0"
3+
}

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Changelog
2+
3+
## 0.1.0 (2024-02-03)
4+
5+
Full Changelog: [v0.0.1...v0.1.0](https://github.com/braintrustdata/braintrust-java/compare/v0.0.1...v0.1.0)
6+
7+
### Features
8+
9+
* Add initial Stainless SDK ([520f7de](https://github.com/braintrustdata/braintrust-java/commit/520f7de5a7a6cf46aba5d0ab537b783dc7594a4b))
10+
* create default branch ([3c5a726](https://github.com/braintrustdata/braintrust-java/commit/3c5a726a0c9b8801d44955b94d3e4b4f565b684b))
11+
* OpenAPI spec update ([#1](https://github.com/braintrustdata/braintrust-java/issues/1)) ([e26d471](https://github.com/braintrustdata/braintrust-java/commit/e26d4714aba88e9b88c326ccebcffcf57a58ad28))

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Braintrust Java API Library
22

3-
[![Maven Central](https://img.shields.io/maven-central/v/com.braintrust.api/braintrust-java)](https://central.sonatype.com/artifact/com.braintrust.api/braintrust-java/0.0.1)
3+
<!-- x-release-please-start-version -->
4+
5+
[![Maven Central](https://img.shields.io/maven-central/v/com.braintrust.api/braintrust-java)](https://central.sonatype.com/artifact/com.braintrust.api/braintrust-java/0.1.0)
6+
7+
<!-- x-release-please-end -->
48

59
The Braintrust Java SDK provides convenient access to the Braintrust REST API from applications written in Java. It includes helper classes with helpful types and documentation for every request and response property.
610

@@ -18,8 +22,10 @@ The REST API documentation can be found [on www.braintrustdata.com](https://www
1822

1923
#### Gradle
2024

25+
<!-- x-release-please-start-version -->
26+
2127
```kotlin
22-
implementation("com.braintrust.api:braintrust-java:0.0.1")
28+
implementation("com.braintrust.api:braintrust-java:0.1.0")
2329
```
2430

2531
#### Maven
@@ -28,10 +34,12 @@ implementation("com.braintrust.api:braintrust-java:0.0.1")
2834
<dependency>
2935
<groupId>com.braintrust.api</groupId>
3036
<artifactId>braintrust-java</artifactId>
31-
<version>0.0.1</version>
37+
<version>0.1.0</version>
3238
</dependency>
3339
```
3440

41+
<!-- x-release-please-end -->
42+
3543
### Configure the client
3644

3745
Use `BraintrustOkHttpClient.builder()` to configure the client. At a minimum you need to set `.apiKey()`:

bin/check-release-environment

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env bash
2+
3+
errors=()
4+
5+
if [ -z "${SONATYPE_USERNAME}" ]; then
6+
errors+=("The BRAINTRUST_SONATYPE_USERNAME secret has not been set. Please set it in either this repository's secrets or your organization secrets")
7+
fi
8+
9+
if [ -z "${SONATYPE_PASSWORD}" ]; then
10+
errors+=("The BRAINTRUST_SONATYPE_PASSWORD secret has not been set. Please set it in either this repository's secrets or your organization secrets")
11+
fi
12+
13+
if [ -z "${GPG_SIGNING_KEY}" ]; then
14+
errors+=("The BRAINTRUST_SONATYPE_GPG_SIGNING_KEY secret has not been set. Please set it in either this repository's secrets or your organization secrets")
15+
fi
16+
17+
if [ -z "${GPG_SIGNING_PASSWORD}" ]; then
18+
errors+=("The BRAINTRUST_SONATYPE_GPG_SIGNING_PASSWORD secret has not been set. Please set it in either this repository's secrets or your organization secrets")
19+
fi
20+
21+
len=${#errors[@]}
22+
23+
if [[ len -gt 0 ]]; then
24+
echo -e "Found the following errors in the release environment:\n"
25+
26+
for error in "${errors[@]}"; do
27+
echo -e "- $error\n"
28+
done
29+
30+
exit 1
31+
fi
32+
33+
echo "The environment is ready to push releases!"

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44

55
allprojects {
66
group = "com.braintrust.api"
7-
version = "0.0.1"
7+
version = "0.1.0" // x-release-please-version
88
}
99

1010
nexusPublishing {

gradle/wrapper/gradle-wrapper.jar

-41.3 KB
Binary file not shown.

gradlew

100644100755
File mode changed.

release-please-config.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"packages": {
3+
".": {}
4+
},
5+
"$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json",
6+
"include-v-in-tag": true,
7+
"include-component-in-tag": false,
8+
"versioning": "prerelease",
9+
"prerelease": true,
10+
"bump-minor-pre-major": true,
11+
"bump-patch-for-minor-pre-major": false,
12+
"pull-request-header": "Automated Release PR",
13+
"pull-request-title-pattern": "release: ${version}",
14+
"changelog-sections": [
15+
{
16+
"type": "feat",
17+
"section": "Features"
18+
},
19+
{
20+
"type": "fix",
21+
"section": "Bug Fixes"
22+
},
23+
{
24+
"type": "perf",
25+
"section": "Performance Improvements"
26+
},
27+
{
28+
"type": "revert",
29+
"section": "Reverts"
30+
},
31+
{
32+
"type": "chore",
33+
"section": "Chores"
34+
},
35+
{
36+
"type": "docs",
37+
"section": "Documentation"
38+
},
39+
{
40+
"type": "style",
41+
"section": "Styles"
42+
},
43+
{
44+
"type": "refactor",
45+
"section": "Refactors"
46+
},
47+
{
48+
"type": "test",
49+
"section": "Tests",
50+
"hidden": true
51+
},
52+
{
53+
"type": "build",
54+
"section": "Build System"
55+
},
56+
{
57+
"type": "ci",
58+
"section": "Continuous Integration",
59+
"hidden": true
60+
}
61+
],
62+
"release-type": "simple",
63+
"extra-files": [
64+
"README.md",
65+
"build.gradle.kts"
66+
]
67+
}

0 commit comments

Comments
 (0)