File tree Expand file tree Collapse file tree 5 files changed +86
-5
lines changed
Expand file tree Collapse file tree 5 files changed +86
-5
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ name: Build
33on :
44 push :
55 pull_request :
6- workflow_call :
76
87jobs :
98 build :
3029 distribution : ' graalvm'
3130 - name : Setup Gradle
3231 uses : gradle/actions/setup-gradle@v5
33- with :
34- cache-read-only : ${{ github.event_name != 'push' }}
3532 - name : Build with Gradle
3633 run : ./gradlew build
3734 - name : Javadoc with Gradle
Original file line number Diff line number Diff line change 1+ name : Publish Release
2+
3+ on :
4+ release :
5+ types : [created]
6+
7+ jobs :
8+ publish :
9+ runs-on : ubuntu-latest
10+ permissions :
11+ contents : read
12+ packages : write
13+ env :
14+ ZSTD_VERSION : v1.5.7
15+ steps :
16+ - uses : actions/checkout@v5
17+ - name : Install zstd from source
18+ run : |
19+ git clone --branch "$ZSTD_VERSION" --depth 1 https://github.com/facebook/zstd.git zstd
20+ cd zstd
21+ make -j$(nproc)
22+ sudo make PREFIX=/usr install
23+ sudo ldconfig
24+ cd ..
25+ - name : Set up JDK 25
26+ uses : actions/setup-java@v5
27+ with :
28+ java-version : ' 25'
29+ distribution : ' graalvm'
30+ - name : Setup Gradle
31+ uses : gradle/actions/setup-gradle@v5
32+ - name : Build with Gradle
33+ run : ./gradlew build
34+ - name : Javadoc with Gradle
35+ run : ./gradlew javadoc
36+ - name : Test with Gradle
37+ run : ./gradlew test
38+ - name : Native tests with Gradle
39+ run : ./gradlew nativeTest
40+ - name : Export TAG_VERSION
41+ run : echo "TAG_VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
42+ - name : Publish to Maven Central
43+ run : ./gradlew publish
44+ env :
45+ ORG_GRADLE_PROJECT_version : ${{ env.TAG_VERSION }}
46+ ORG_GRADLE_PROJECT_mavenCentralUsername : ${{ secrets.CENTRAL_USERNAME }}
47+ ORG_GRADLE_PROJECT_mavenCentralPassword : ${{ secrets.CENTRAL_PASSWORD }}
48+ ORG_GRADLE_PROJECT_signingInMemoryKey : ${{ secrets.CENTRAL_SIGNINGKEY }}
49+ ORG_GRADLE_PROJECT_signingInMemoryKeyPassword : ${{ secrets.CENTRAL_SIGNINGKEY_PASSWORD }}
Original file line number Diff line number Diff line change @@ -15,4 +15,6 @@ Support bindings separately to allow implementations that just consume the jextr
1515
16161.0 Will not be tagged until all TODOS are addressed, and Streaming no longer can do out of bound accesses
1717
18- Consider splitting API into dev.hallock.zstd.api to use services pro
18+ Consider splitting API into dev.hallock.zstd.api to use services pro
19+
20+ Unify GitHub common workflow actions steps
Original file line number Diff line number Diff line change 11plugins {
22 `java- library`
33 alias(libs.plugins.graalvm.buildtools)
4+ alias(libs.plugins.maven.publish)
45}
56
67group = " dev.hallock.zstd"
@@ -60,3 +61,33 @@ graalvmNative {
6061 }
6162}
6263
64+ mavenPublishing {
65+ publishToMavenCentral(automaticRelease = false )
66+ signAllPublications()
67+
68+ pom {
69+ name.set(" zstd-java" )
70+ description.set(" Java (FFM) API for Zstandard (zstd)" )
71+ inceptionYear.set(" 2026" )
72+ url.set(" https://github.com/ryanhallock/zstd-java/" )
73+ licenses {
74+ license {
75+ name.set(" The Apache License, Version 2.0" )
76+ url.set(" http://www.apache.org/licenses/LICENSE-2.0.txt" )
77+ distribution.set(" http://www.apache.org/licenses/LICENSE-2.0.txt" )
78+ }
79+ }
80+ developers {
81+ developer {
82+ id.set(" ryanhallock" )
83+ name.set(" Ryan Hallock" )
84+ url.set(" https://github.com/ryanhallock/" )
85+ }
86+ }
87+ scm {
88+ url.set(" https://github.com/ryanhallock/zstd-java/" )
89+ connection.set(" scm:git:git://github.com/ryanhallock/zstd-java.git" )
90+ developerConnection.set(" scm:git:ssh://git@github.com/ryanhallock/zstd-java.git" )
91+ }
92+ }
93+ }
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ graalvm-buildtools = "0.11.5"
33jspecify = " 1.0.0"
44junit = " 6.0.3"
55jextract = " 1.4.0"
6+ maven-publish = " 0.36.0"
67
78[libraries ]
89jspecify = { group = " org.jspecify" , name = " jspecify" , version.ref = " jspecify" }
@@ -13,4 +14,5 @@ junit-platform-launcher = { module = "org.junit.platform:junit-platform-launcher
1314
1415[plugins ]
1516graalvm-buildtools = { id = " org.graalvm.buildtools.native" , version.ref = " graalvm-buildtools" }
16- jextract = { id = " de.infolektuell.jextract" , version.ref = " jextract" }
17+ jextract = { id = " de.infolektuell.jextract" , version.ref = " jextract" }
18+ maven-publish = { id = " com.vanniktech.maven.publish" , version.ref = " maven-publish" }
You can’t perform that action at this time.
0 commit comments