File tree 6 files changed +56
-43
lines changed
6 files changed +56
-43
lines changed Original file line number Diff line number Diff line change 49
49
cache : maven
50
50
- name : verify-${{matrix.name}}
51
51
run : mvn verify --settings .settings.xml -Dgpg.skip -B -V
52
- publish-dry-run :
53
- name : publish-dry-run
54
- uses : ./.github/workflows/publish-dry-run.yml
Original file line number Diff line number Diff line change
1
+ name : package
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ - develop
8
+ workflow_dispatch :
9
+
10
+ jobs :
11
+ package :
12
+ name : package
13
+ runs-on : ubuntu-latest
14
+ permissions :
15
+ contents : write
16
+ packages : write
17
+ steps :
18
+ - name : checkout
19
+ uses : actions/checkout@v3
20
+ - name : setup-toolchain
21
+ uses : actions/setup-java@v2
22
+ with :
23
+ java-version : 8
24
+ distribution : temurin
25
+ cache : maven
26
+ - name : setup-gpg
27
+ uses : crazy-max/ghaction-import-gpg@v5
28
+ with :
29
+ gpg_private_key : ${{secrets.MAVEN_GPG_PRIVATE_KEY}}
30
+ passphrase : ${{secrets.MAVEN_GPG_PASSPHRASE}}
31
+ - name : package
32
+ env :
33
+ MAVEN_USERNAME : ${{secrets.MAVEN_USERNAME}}
34
+ MAVEN_PASSWORD : ${{secrets.MAVEN_PASSWORD}}
35
+ MAVEN_GPG_KEYNAME : ${{secrets.MAVEN_GPG_KEYNAME}}
36
+ MAVEN_GPG_PASSPHRASE : ${{secrets.MAVEN_GPG_PASSPHRASE}}
37
+ run : mvn package -P release --batch-mode --settings .settings.xml -DskipTests=true -DperformRelease=false -Dmaven.deploy.skip=true --update-snapshots -B -V
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- name : publish-dry-run
1
+ name : publish
2
2
3
3
on :
4
4
release :
7
7
workflow_dispatch :
8
8
9
9
jobs :
10
- publish-dry-run :
11
- name : publish-dry-run
12
- uses : ./.github/workflows/publish-dry-run.yml
13
10
publish :
14
11
name : publish
15
- needs :
16
- - publish-dry-run
17
12
runs-on : ubuntu-latest
18
13
permissions :
19
14
contents : write
@@ -28,10 +23,21 @@ jobs:
28
23
distribution : temurin
29
24
cache : maven
30
25
- name : setup-gpg
31
- run : ' echo -n "${{secrets.MAVEN_GPG_PRIVATE_KEY}}" | base64 --decode | gpg --batch --import'
26
+ uses : crazy-max/ghaction-import-gpg@v5
27
+ with :
28
+ gpg_private_key : ${{secrets.MAVEN_GPG_PRIVATE_KEY}}
29
+ passphrase : ${{secrets.MAVEN_GPG_PASSPHRASE}}
32
30
- name : publish
33
31
env :
34
32
MAVEN_USERNAME : ${{secrets.MAVEN_USERNAME}}
35
- MAVEN_TOKEN : ${{secrets.MAVEN_TOKEN}}
33
+ MAVEN_PASSWORD : ${{secrets.MAVEN_PASSWORD}}
34
+ MAVEN_GPG_KEYNAME : ${{secrets.MAVEN_GPG_KEYNAME}}
36
35
MAVEN_GPG_PASSPHRASE : ${{secrets.MAVEN_GPG_PASSPHRASE}}
37
36
run : mvn deploy -P release --batch-mode --settings .settings.xml -DperformRelease=false --update-snapshots -B -V
37
+ - name : artifacts
38
+ uses : softprops/action-gh-release@v1
39
+ with :
40
+ files : |
41
+ ulidj-*.pom
42
+ ulidj-*.jar
43
+ ulidj-*.asc
Original file line number Diff line number Diff line change 2
2
<settings xmlns =" http://maven.apache.org/SETTINGS/1.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd" >
3
3
<servers >
4
4
<server >
5
- <id >maven </id >
5
+ <id >ossrh </id >
6
6
<username >${env.MAVEN_USERNAME}</username >
7
- <password >${env.MAVEN_TOKEN }</password >
7
+ <password >${env.MAVEN_PASSWORD }</password >
8
8
</server >
9
9
<server >
10
10
<id >gpg.passphrase</id >
Original file line number Diff line number Diff line change 93
93
<plugin >
94
94
<groupId >net.revelc.code.formatter</groupId >
95
95
<artifactId >formatter-maven-plugin</artifactId >
96
- <version >2.22.0</version >
96
+ <!-- Sticking to this version as it is the latest that supports JDK8 -->
97
+ <version >2.16.0</version >
97
98
<configuration >
98
99
<configFile >${project.basedir} /eclipse-java-google-style.xml</configFile >
99
100
<encoding >${project.build.sourceEncoding} </encoding >
166
167
<goal >sign</goal >
167
168
</goals >
168
169
<configuration >
170
+ <keyname >${env.MAVEN_GPG_KEYNAME} </keyname >
169
171
<!-- Prevent gpg from using pinentry programs -->
170
172
<gpgArguments >
171
173
<arg >--pinentry-mode</arg >
You can’t perform that action at this time.
0 commit comments