File tree Expand file tree Collapse file tree 5 files changed +86
-21
lines changed Expand file tree Collapse file tree 5 files changed +86
-21
lines changed Original file line number Diff line number Diff line change 5
5
paths :
6
6
- ' **/*'
7
7
8
+ env :
9
+ ORG_GRADLE_PROJECT_ossrhUsername : ${{ secrets.OSSRH_USERNAME }}
10
+ ORG_GRADLE_PROJECT_ossrhPassword : ${{ secrets.OSSRH_PASSWORD }}
11
+
8
12
jobs :
9
13
lint-test-sdk :
10
14
runs-on : ubuntu-latest
21
25
with :
22
26
java-version : ${{ matrix.java-version }}
23
27
distribution : ' adopt'
28
+ gpg-private-key : ${{ secrets.GPG_PRIVATE_KEY }}
29
+ gpg-passphrase : ${{ secrets.GPG_PASSPHRASE }}
24
30
25
31
- name : Run tests
26
- run : ./gradlew check
27
- env :
28
- ORG_GRADLE_PROJECT_ossrhUsername : ${{ secrets.OSSRH_USERNAME }}
29
- ORG_GRADLE_PROJECT_ossrhPassword : ${{ secrets.OSSRH_PASSWORD }}
32
+ run : ./gradlew check --no-daemon
Original file line number Diff line number Diff line change 1
- name : Publish sdk to the Maven Central Repository
1
+ name : Publish release SDK to the Maven Central Repository
2
+
2
3
on :
3
4
release :
4
5
types : [published]
6
+
7
+ env :
8
+ ORG_GRADLE_PROJECT_ossrhUsername : ${{ secrets.OSSRH_USERNAME }}
9
+ ORG_GRADLE_PROJECT_ossrhPassword : ${{ secrets.OSSRH_PASSWORD }}
10
+
5
11
jobs :
6
12
publish :
7
13
runs-on : ubuntu-latest
@@ -14,24 +20,14 @@ jobs:
14
20
java-version : ' 8'
15
21
distribution : ' temurin'
16
22
server-id : ossrh
17
- server-username : MAVEN_USERNAME
18
- server-password : MAVEN_PASSWORD
19
23
gpg-private-key : ${{ secrets.GPG_PRIVATE_KEY }}
20
- gpg-passphrase : GPG_PASSPHRASE
24
+ gpg-passphrase : ${{ secrets. GPG_PASSPHRASE }}
21
25
22
26
- name : Download test data
23
27
run : make test-data
24
28
25
- - name : Publish package with debug logging
26
- run : mvn --batch-mode deploy -X
27
- env :
28
- MAVEN_USERNAME : ${{ secrets.OSSRH_USERNAME }}
29
- MAVEN_PASSWORD : ${{ secrets.OSSRH_PASSWORD }}
30
- GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
31
-
32
- - name : Release the staging repository
33
- run : mvn nexus-staging:release -X
29
+ - name : Publish to Maven Central
30
+ run : ./gradlew publish --no-daemon
34
31
env :
35
- MAVEN_USERNAME : ${{ secrets.OSSRH_USERNAME }}
36
- MAVEN_PASSWORD : ${{ secrets.OSSRH_PASSWORD }}
32
+ GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY }}
37
33
GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
Original file line number Diff line number Diff line change
1
+ name : Publish SDK Snapshot artifact
2
+
3
+ on :
4
+ push :
5
+ branches : [main]
6
+
7
+ env :
8
+ ORG_GRADLE_PROJECT_ossrhUsername : ${{ secrets.OSSRH_USERNAME }}
9
+ ORG_GRADLE_PROJECT_ossrhPassword : ${{ secrets.OSSRH_PASSWORD }}
10
+
11
+ jobs :
12
+ publish-snapshot :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - uses : actions/checkout@v4
16
+ with :
17
+ fetch-depth : 0
18
+
19
+ - name : Set up JDK 17
20
+ uses : actions/setup-java@v4
21
+ with :
22
+ java-version : 17
23
+ distribution : ' adopt'
24
+ gpg-private-key : ${{ secrets.GPG_PRIVATE_KEY }}
25
+ gpg-passphrase : ${{ secrets.GPG_PASSPHRASE }}
26
+
27
+ - name : Publish Snapshot artifact
28
+ run : ./gradlew publish --no-daemon
29
+ env :
30
+ GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY }}
31
+ GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
Original file line number Diff line number Diff line change 1
1
# Eppo JVM common SDK
2
2
3
- This is the common SDK for the Eppo JVM. It provides a set of classes and interfaces that are used by the Eppo JVM to
4
- interact with the Eppo API.
3
+ This is the common SDK for the Eppo JVM SDKs. It provides a set of classes and interfaces that are used by the SDKs to
4
+ 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 )
5
+ or [ JVM] ( https://github.com/Eppo-exp/java-server-sdk ) SDKs.
6
+
7
+ # Usage
8
+
9
+ ## build.gradle:
10
+
11
+ ``` groovy
12
+ dependencies {
13
+ implementation 'cloud.eppo:sdk-common-jvm:1.0.0'
14
+ }
15
+ ```
16
+
17
+ # Releasing a new version
18
+
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 ` .
23
+
24
+ # Using Snapshots
25
+ If you would like to live on the bleeding edge, you can try running against a snapshot build. Keep in mind that snapshots
26
+ represent the most recent changes on master and may contain bugs.
27
+
28
+ ## build.gradle:
29
+
30
+ ``` groovy
31
+ repositories {
32
+ maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots" }
33
+ }
34
+
35
+ dependencies {
36
+ implementation 'cloud.eppo:sdk-common-jvm:1.0.0-SNAPSHOT'
37
+ }
38
+ ```
Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ publishing {
107
107
108
108
signing {
109
109
sign publishing. publications. mavenJava
110
+ useInMemoryPgpKeys(System . env. GPG_PRIVATE_KEY , System . env. GPG_PASSPHRASE )
110
111
}
111
112
112
113
You can’t perform that action at this time.
0 commit comments