Skip to content

Commit 2cf91e8

Browse files
authored
chore: Prepare for release v1.0.0 (#4)
* chore: Prepare for release v1.0.0 * more readme and project release tweaks * fix syntax * more formatting * add link for GPG config instructions * better steps
1 parent 01e241b commit 2cf91e8

File tree

5 files changed

+33
-15
lines changed

5 files changed

+33
-15
lines changed

.github/workflows/lint-test-sdk.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
env:
99
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.OSSRH_USERNAME }}
1010
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRH_PASSWORD }}
11+
CI: true
1112

1213
jobs:
1314
lint-test-sdk:

.github/workflows/publish-sdk.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
env:
88
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.OSSRH_USERNAME }}
99
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRH_PASSWORD }}
10+
CI: true
1011

1112
jobs:
1213
publish:
@@ -23,9 +24,6 @@ jobs:
2324
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
2425
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
2526

26-
- name: Download test data
27-
run: make test-data
28-
2927
- name: Publish to Maven Central
3028
run: ./gradlew publish --no-daemon
3129
env:

.github/workflows/publish-snapshot.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
env:
88
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.OSSRH_USERNAME }}
99
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRH_PASSWORD }}
10+
CI: true
1011

1112
jobs:
1213
publish-snapshot:
@@ -25,7 +26,7 @@ jobs:
2526
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
2627

2728
- name: Publish Snapshot artifact
28-
run: ./gradlew publish --no-daemon
29+
run: ./gradlew check publish --no-daemon
2930
env:
3031
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
3132
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

README.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,44 @@ This is the common SDK for the Eppo JVM SDKs. It provides a set of classes and i
44
interact with the Eppo API. You should probably not use this library directly and instead use the [Android](https://github.com/Eppo-exp/android-sdk)
55
or [JVM](https://github.com/Eppo-exp/java-server-sdk) SDKs.
66

7-
# Usage
7+
## Usage
88

9-
## build.gradle:
9+
### build.gradle:
1010

1111
```groovy
1212
dependencies {
1313
implementation 'cloud.eppo:sdk-common-jvm:1.0.0'
1414
}
1515
```
1616

17-
# Releasing a new version
17+
## Releasing a new version
1818

19-
Bump the project version in `build.gradle`
20-
To release a new version of the SDK, you need to create a new tag in the repository. The tag should be named `vX.Y.Z`,
21-
where `X.Y.Z` is the version number of the release. For example, if you are releasing version 1.2.3, the tag should be
22-
named `v1.2.3`.
19+
For publishing a release locally, follow the steps below.
20+
21+
### Prerequisites
22+
23+
1. [Generate a user token](https://central.sonatype.org/publish/generate-token/) on `s01.oss.sonatype.org`;
24+
2. [Configure a GPG key](https://central.sonatype.org/publish/requirements/gpg/) for signing the artifact. Don't forget to upload it to the key server;
25+
3. Make sure you have the following vars in your `~/.gradle/gradle.properties` file:
26+
1. `ossrhUsername` - User token username for Sonatype generated in step 1
27+
2. `ossrhPassword` - User token password for Sonatype generated in step 1
28+
3. `signing.keyId` - GPG key ID generated in step 2
29+
4. `signing.password` - GPG key password generated in step 2
30+
5. `signing.secretKeyRingFile` - Path to GPG key file generated in step 2
31+
32+
Once you have the prerequisites, follow the steps below to release a new version:
33+
34+
1. Bump the project version in `build.gradle`
35+
2. Run `./gradlew publish`
36+
3. Follow the steps in [this page](https://central.sonatype.org/publish/release/#credentials) to promote your release
37+
38+
## Using Snapshots
2339

24-
# Using Snapshots
2540
If you would like to live on the bleeding edge, you can try running against a snapshot build. Keep in mind that snapshots
2641
represent the most recent changes on master and may contain bugs.
42+
Snapshots are published automatically after each push to `main` branch.
2743

28-
## build.gradle:
44+
### build.gradle:
2945

3046
```groovy
3147
repositories {

build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66
}
77

88
group = 'cloud.eppo'
9-
version = '1.0.0-SNAPSHOT'
9+
version = '2.0.0-SNAPSHOT'
1010
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
1111

1212
dependencies {
@@ -107,7 +107,9 @@ publishing {
107107

108108
signing {
109109
sign publishing.publications.mavenJava
110-
useInMemoryPgpKeys(System.env.GPG_PRIVATE_KEY, System.env.GPG_PASSPHRASE)
110+
if (System.env['CI']) {
111+
useInMemoryPgpKeys(System.env.GPG_PRIVATE_KEY, System.env.GPG_PASSPHRASE)
112+
}
111113
}
112114

113115

0 commit comments

Comments
 (0)