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+ name : Publish package to the Maven Central Repository
2+
3+ on :
4+ push :
5+ tags :
6+ - v*
7+
8+ jobs :
9+ publish :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v2
13+ - name : Set up Maven Central Repository
14+ uses : actions/setup-java@v1
15+ with :
16+ java-version : 1.8
17+ - name : Configure GPG Key
18+ run : |
19+ mkdir -p ~/.gnupg/
20+ printf "${GPG_SIGNING_KEY}" | base64 --decode > ~/.gnupg/private.key
21+ md5sum ~/.gnupg/private.key
22+ gpg --import --no-tty --batch --yes ~/.gnupg/private.key
23+ echo use-agent >> ~/.gnupg/gpg.conf
24+ echo pinentry-mode loopback >> ~/.gnupg/gpg.conf
25+ echo allow-loopback-pinentry >> ~/.gnupg/gpg-agent.conf
26+ echo RELOADAGENT | gpg-connect-agent
27+ gpg --list-keys
28+ env :
29+ GPG_SIGNING_KEY : ${{ secrets.GPG_SIGNING_KEY }}
30+ - name : Configure Maven Credentials and GPG Key
31+ run : ./release.sh config_maven
32+ env :
33+ OSSRH_USERNAME : ${{ secrets.OSSRH_USERNAME }}
34+ OSSRH_TOKEN : ${{ secrets.OSSRH_TOKEN }}
35+ GPG_KEYNAME : ${{ secrets.GPG_KEYNAME }}
36+ GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
37+ - name : Publish package
38+ run : mvn clean deploy --settings="./.github/workflows/settings.xml"
You can’t perform that action at this time.
0 commit comments