File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Release to Maven Central
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*.*.*'
7+
8+ jobs :
9+ release :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - uses : actions/checkout@v4
14+
15+ - name : Derive version from tag
16+ run : |
17+ echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV"
18+ echo "Will release version: ${GITHUB_REF_NAME#v}"
19+
20+ - name : Set up JDK 21
21+ uses : actions/setup-java@v4
22+ with :
23+ distribution : temurin
24+ java-version : ' 21'
25+
26+ - name : Cache Gradle
27+ uses : gradle/actions/setup-gradle@v4
28+
29+ - name : Prepare GPG key file
30+ run : |
31+ mkdir -p $HOME/.gnupg
32+ echo "${{ secrets.GPG_SIGNING_KEY_B64 }}" | base64 -d > $HOME/.gnupg/fixtures.asc
33+ chmod 600 $HOME/.gnupg/fixtures.asc
34+
35+ - name : Publish to Maven Central (close staging)
36+ env :
37+ SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
38+ SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
39+ GPG_SIGNING_PASSPHRASE : ${{ secrets.GPG_SIGNING_PASSPHRASE }}
40+ run : |
41+ ./gradlew \
42+ -PVERSION_NAME="$VERSION" \
43+ -PsigningKeyFile="$HOME/.gnupg/fixtures.asc" \
44+ -PsigningPass="${GPG_SIGNING_PASSPHRASE}" \
45+ -PsonatypeUsername="${SONATYPE_USERNAME}" \
46+ -PsonatypePassword="${SONATYPE_PASSWORD}" \
47+ clean publishToSonatype closeSonatypeStagingRepository \
48+ --no-daemon --info
You can’t perform that action at this time.
0 commit comments