Skip to content

Commit 3df1f83

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): api update (#1)
1 parent 60c35dc commit 3df1f83

File tree

12 files changed

+328
-235
lines changed

12 files changed

+328
-235
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/OmniStack-sh/omnistack-kotlin/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@v4
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 --parallel --no-daemon publish
34+
env:
35+
SONATYPE_USERNAME: ${{ secrets.OMNISTACK_SONATYPE_USERNAME || secrets.SONATYPE_USERNAME }}
36+
SONATYPE_PASSWORD: ${{ secrets.OMNISTACK_SONATYPE_PASSWORD || secrets.SONATYPE_PASSWORD }}
37+
GPG_SIGNING_KEY_ID: ${{ secrets.OMNISTACK_SONATYPE_GPG_SIGNING_KEY_ID || secrets.GPG_SIGNING_KEY_ID }}
38+
GPG_SIGNING_KEY: ${{ secrets.OMNISTACK_SONATYPE_GPG_SIGNING_KEY || secrets.GPG_SIGNING_KEY }}
39+
GPG_SIGNING_PASSWORD: ${{ secrets.OMNISTACK_SONATYPE_GPG_SIGNING_PASSWORD || secrets.GPG_SIGNING_PASSWORD }}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Release Doctor
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
8+
jobs:
9+
release_doctor:
10+
name: release doctor
11+
runs-on: ubuntu-latest
12+
if: github.repository == 'OmniStack-sh/omnistack-kotlin' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Check release environment
18+
run: |
19+
bash ./bin/check-release-environment
20+
env:
21+
SONATYPE_USERNAME: ${{ secrets.OMNISTACK_SONATYPE_USERNAME || secrets.SONATYPE_USERNAME }}
22+
SONATYPE_PASSWORD: ${{ secrets.OMNISTACK_SONATYPE_PASSWORD || secrets.SONATYPE_PASSWORD }}
23+
GPG_SIGNING_KEY_ID: ${{ secrets.OMNISTACK_SONATYPE_GPG_SIGNING_KEY_ID || secrets.GPG_SIGNING_KEY_ID }}
24+
GPG_SIGNING_KEY: ${{ secrets.OMNISTACK_SONATYPE_GPG_SIGNING_KEY || secrets.GPG_SIGNING_KEY }}
25+
GPG_SIGNING_PASSWORD: ${{ secrets.OMNISTACK_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.0.1-alpha.0"
3+
}

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ The REST API documentation can be found on [docs.omnistack.sh](https://docs.omn
1818

1919
#### Gradle
2020

21+
<!-- x-release-please-start-version -->
22+
2123
```kotlin
2224
implementation("com.omnistack.api:omnistack-kotlin:0.0.1-alpha.0")
2325
```
@@ -32,6 +34,8 @@ implementation("com.omnistack.api:omnistack-kotlin:0.0.1-alpha.0")
3234
</dependency>
3335
```
3436

37+
<!-- x-release-please-end -->
38+
3539
### Configure the client
3640

3741
Use `OmnistackOkHttpClient.builder()` to configure the client. At a minimum you need to set `.apiKey()`:
@@ -218,7 +222,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con
218222

219223
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
220224

221-
We are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/omnistack-kotlin/issues) with questions, bugs, or suggestions.
225+
We are keen for your feedback; please open an [issue](https://www.github.com/OmniStack-sh/omnistack-kotlin/issues) with questions, bugs, or suggestions.
222226

223227
## Requirements
224228

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 OMNISTACK_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 OMNISTACK_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 OMNISTACK_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 OMNISTACK_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+
lenErrors=${#errors[@]}
22+
23+
if [[ lenErrors -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.omnistack.api"
7-
version = "0.0.1-alpha.0"
7+
version = "0.0.1-alpha.0" // x-release-please-version
88
}
99

1010
nexusPublishing {

buildSrc/src/main/kotlin/omnistack.publish.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ configure<PublishingExtension> {
3333
}
3434

3535
scm {
36-
connection.set("scm:git:git://github.com/stainless-sdks/omnistack-kotlin.git")
37-
developerConnection.set("scm:git:git://github.com/stainless-sdks/omnistack-kotlin.git")
38-
url.set("https://github.com/stainless-sdks/omnistack-kotlin")
36+
connection.set("scm:git:git://github.com/OmniStack-sh/omnistack-kotlin.git")
37+
developerConnection.set("scm:git:git://github.com/OmniStack-sh/omnistack-kotlin.git")
38+
url.set("https://github.com/OmniStack-sh/omnistack-kotlin")
3939
}
4040

4141
versionMapping {

0 commit comments

Comments
 (0)