File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <settings xsi : schemaLocation =" http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"
3+ xmlns =" http://maven.apache.org/SETTINGS/1.0.0"
4+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" >
5+ <servers >
6+ <server >
7+ <id >ossrh</id >
8+ <username >${env.MAVEN_USERNAME}</username >
9+ <password >${env.MAVEN_PASSWORD}</password >
10+ </server >
11+ </servers >
12+ </settings >
Original file line number Diff line number Diff line change 1+ name : Publish JRE11 to the Maven Central
2+ on :
3+ release :
4+ types : [created]
5+
6+ workflow_dispatch :
7+
8+ jobs :
9+ publish :
10+ runs-on : ubuntu-latest
11+ environment : maven-central
12+ steps :
13+ - uses : actions/checkout@v4
14+ - name : Set up JDK 11
15+ uses : actions/setup-java@v4
16+ with :
17+ java-version : 11
18+ distribution : ' temurin'
19+ server-id : ossrh
20+ - name : Import GPG Key
21+ uses : crazy-max/ghaction-import-gpg@v6
22+ with :
23+ gpg_private_key : ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
24+ passphrase : ${{ secrets.MAVEN_GPG_PASSPHRASE }}
25+ - name : Publish package
26+ run : mvn -B -Pmaven-central -Dgpg.passphrase=${{secrets.MAVEN_GPG_PASSPHRASE}} -s .github/maven-central-settings.xml deploy
27+ env :
28+ MAVEN_USERNAME : ${{ secrets.OSSRH_USERNAME }}
29+ MAVEN_PASSWORD : ${{ secrets.OSSRH_TOKEN }}
You can’t perform that action at this time.
0 commit comments