File tree 2 files changed +54
-1
lines changed
2 files changed +54
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Release
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' *'
7
+
8
+ jobs :
9
+ build :
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - uses : actions/checkout@v2
14
+
15
+ - name : get version from tag
16
+ id : get_version
17
+ run : |
18
+ realversion="${GITHUB_REF/refs\/tags\//}"
19
+ realversion="${realversion//v/}"
20
+ echo "::set-output name=VERSION::$realversion"
21
+
22
+ - name : Set up publishing to maven central
23
+ uses : actions/setup-java@v2
24
+ with :
25
+ java-version : ' 8'
26
+ distribution : ' adopt'
27
+ server-id : ossrh
28
+ server-username : MAVEN_USERNAME
29
+ server-password : MAVEN_PASSWORD
30
+
31
+ - name : mvn versions
32
+ run : mvn versions:set -DnewVersion=${{ steps.get_version.outputs.VERSION }}
33
+
34
+ - name : Install gpg key
35
+ run : |
36
+ cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
37
+ gpg --list-secret-keys --keyid-format LONG
38
+
39
+ - name : Publish
40
+ run : |
41
+ mvn --no-transfer-progress \
42
+ --batch-mode \
43
+ -Dgpg.passphrase='${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' \
44
+ -DskipTests deploy -P release
45
+ env :
46
+ MAVEN_USERNAME : ${{secrets.OSSH_USERNAME}}
47
+ MAVEN_PASSWORD : ${{secrets.OSSH_TOKEN}}
Original file line number Diff line number Diff line change 236
236
<!-- Sign the components - this is required by maven central for releases -->
237
237
<plugin >
238
238
<artifactId >maven-gpg-plugin</artifactId >
239
- <version >1.6</version >
239
+ <version >3.0.1</version >
240
+ <configuration >
241
+ <gpgArguments >
242
+ <arg >--pinentry-mode</arg >
243
+ <arg >loopback</arg >
244
+ </gpgArguments >
245
+ </configuration >
240
246
<executions >
241
247
<execution >
242
248
<id >sign-artifacts</id >
You can’t perform that action at this time.
0 commit comments