File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish To Maven
2
+
3
+ on :
4
+ release :
5
+ types : [created]
6
+ workflow_dispatch :
7
+
8
+ jobs :
9
+ publish :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Checkout code
13
+ uses : actions/checkout@v4
14
+
15
+ - name : Install gpg secret key
16
+ run : |
17
+ cat <(echo -e "${{ secrets.SIGNING_KEY }}") | gpg --batch --import
18
+
19
+ - name : Set up Maven Central Repository
20
+ uses : actions/setup-java@v4
21
+ with :
22
+ java-version : ' 8'
23
+ distribution : ' temurin'
24
+ server-id : central
25
+ server-username : MAVEN_USERNAME
26
+ server-password : MAVEN_PASSWORD
27
+ gpg-private-key : ${{ secrets.SIGNING_KEY }}
28
+ gpg-passphrase : MAVEN_GPG_PASSPHRASE
29
+
30
+ - name : Publish package
31
+ run : |
32
+ mvn \
33
+ --no-transfer-progress \
34
+ --batch-mode \
35
+ -Dgpg.passphrase=${{ secrets.SIGNING_PASSWORD }} \
36
+ clean deploy -P release-sign-artifacts -e
37
+ env :
38
+ MAVEN_USERNAME : ${{ secrets.NEXUS_USERNAME }}
39
+ MAVEN_PASSWORD : ${{ secrets.NEXUS_PASSWORD }}
40
+ MAVEN_GPG_PASSPHRASE : ${{ secrets.SIGNING_PASSWORD }}
You can’t perform that action at this time.
0 commit comments