File tree Expand file tree Collapse file tree 2 files changed +45
-1
lines changed Expand file tree Collapse file tree 2 files changed +45
-1
lines changed Original file line number Diff line number Diff line change 1
- name : CI
1
+ name : CI Build
2
2
3
3
on :
4
4
push :
Original file line number Diff line number Diff line change
1
+ name : Maven Release
2
+
3
+ on :
4
+ workflow_dispatch :
5
+
6
+ jobs :
7
+ build :
8
+ name : Release to Maven Central
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v2
12
+ - name : Set up JDK
13
+ uses : actions/setup-java@v2
14
+ with :
15
+ distribution : " adopt"
16
+ java-version : " 8"
17
+
18
+ - name : Set up credentials
19
+ env :
20
+ MAVEN_GPG_KEY : ${{ secrets.MAVEN_GPG_KEY }}
21
+ MAVEN_GPG_PASSPHRASE : ${{ secrets.MAVEN_GPG_PASSPHRASE }}
22
+ MAVEN_USERNAME : ${{ secrets.MAVEN_USERNAME }}
23
+ MAVEN_PASSWORD : ${{ secrets.MAVEN_PASSWORD }}
24
+ run : |
25
+ mkdir -p ~/.m2
26
+ cat <<EOT > ~/.m2/settings.xml
27
+ <settings>
28
+ <servers>
29
+ <server>
30
+ <id>ossrh</id>
31
+ <username>${MAVEN_USERNAME}</username>
32
+ <password>${MAVEN_PASSWORD}</password>
33
+ </server>
34
+ </servers>
35
+ </settings>
36
+ EOT
37
+
38
+ export GPG_TTY=$(tty)
39
+ echo -e "$MAVEN_GPG_KEY" | sed 's/\$/\n/' > /tmp/maven.gpg
40
+ gpg --no-tty --pinentry-mode loopback --passphrase $MAVEN_GPG_PASSPHRASE --import /tmp/maven.gpg
41
+ gpg -ab --no-tty --pinentry-mode loopback --passphrase $MAVEN_GPG_PASSPHRASE /tmp/maven.gpg
42
+
43
+ - name : Maven Publish
44
+ run : make publish-maven
You can’t perform that action at this time.
0 commit comments