File tree Expand file tree Collapse file tree 5 files changed +227
-203
lines changed Expand file tree Collapse file tree 5 files changed +227
-203
lines changed Original file line number Diff line number Diff line change 44name : Maven Package
55
66on :
7+ workflow_dispatch :
78 release :
89 types :
910 - published
1920 uses : actions/setup-java@v1
2021 with :
2122 java-version : 1.8
22-
23- - name : Build with Maven
23+ - name : GPG Setup
24+ env :
25+ GPG_KEY_BASE64 : ${{ secrets.GPG_KEY_BASE64 }}
26+ GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
27+ run : ./gpg-setup.sh
28+ - name : Deploy to OSS Sonatype
2429 env :
25- SONATYPE_PASSWORD : ${{ secrets.SonatypePassword }}
26- run : mvn -B deploy --file pom.xml -s settings-template.xml
30+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
31+ OSS_SONATYPE_PASSWORD : ${{ secrets.OSS_SONATYPE_PASSWORD }}
32+ run : mvn -B -Prelease source:jar javadoc:jar deploy --file pom.xml -s settings-template.xml -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ #
4+ # Prepare GPG Key is expected to be in base64
5+ # Exported with gpg -a --export-secret-keys "your@email" | base64 > gpg.base64
6+ #
7+ printf " $GPG_KEY_BASE64 " | base64 --decode > gpg.asc
8+ echo ${GPG_PASSPHRASE} | gpg --batch --yes --passphrase-fd 0 --import gpg.asc
9+ gpg -k
You can’t perform that action at this time.
0 commit comments