Skip to content

Commit 7f829e5

Browse files
committed
Working on release
1 parent 02cced1 commit 7f829e5

File tree

4 files changed

+92
-27
lines changed

4 files changed

+92
-27
lines changed

.github/workflows/merge.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ jobs:
2727
with:
2828
java-version: '8'
2929
distribution: 'temurin'
30-
- name: Build with Gradle
31-
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
32-
with:
33-
arguments: build
30+
cache: maven
31+
server-id: ossrh
32+
server-username: ${{ secrets.OSSRH_USERNAME }}
33+
server-password: ${{ secrets.OSSRH_PASSWORD }}
34+
- name: Build with Maven
35+
run: mvn --batch-mode --update-snapshots verify
3436
- name: Upload coverage to Codecov
3537
uses: codecov/codecov-action@v2
3638
with:
@@ -39,11 +41,9 @@ jobs:
3941
name: coverage # optional
4042
fail_ci_if_error: true # optional (default = false)
4143
verbose: true # optional (default = false)
42-
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
43-
# the publishing section of your build.gradle
44-
- name: Publish to Sonatype (Maven)
45-
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
46-
with:
47-
arguments: publish -PossrhUsername=${{ secrets.OSSRH_USERNAME }} -PossrhPassword=${{ secrets.OSSRH_PASSWORD }}
44+
- run: mkdir staging && cp target/*.jar staging
45+
- name: Publish package
46+
run: mvn --batch-mode deploy
4847
env:
49-
REPOSITORY_URL: https://s01.oss.sonatype.org/content/repositories/snapshots/
48+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
49+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

.github/workflows/pullrequest.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,22 @@ permissions:
1717

1818
jobs:
1919
build:
20-
2120
runs-on: ubuntu-latest
22-
2321
steps:
2422
- uses: actions/checkout@v3
2523
- name: Set up JDK 8
2624
uses: actions/setup-java@v3
2725
with:
2826
java-version: '8'
2927
distribution: 'temurin'
30-
- name: Build with Gradle
31-
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
32-
with:
33-
arguments: build
28+
cache: maven
29+
- name: Build with Maven
30+
run: mvn --batch-mode --update-snapshots verify
3431
- name: Upload coverage to Codecov
3532
uses: codecov/codecov-action@v2
3633
with:
3734
directory: lib/build
3835
flags: unittests # optional
39-
name: pr coverage # optional
36+
name: coverage # optional
4037
fail_ci_if_error: true # optional (default = false)
41-
verbose: true # optional (default = false)
38+
verbose: true # optional (default = false)

pom.xml

Lines changed: 76 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,7 @@
4141
<version>1.7.36</version>
4242
</dependency>
4343

44-
<dependency>
45-
<groupId>org.junit.jupiter</groupId>
46-
<artifactId>junit-jupiter</artifactId>
47-
<version>5.8.1</version>
48-
<scope>test</scope>
49-
</dependency>
50-
44+
<!-- test -->
5145
<dependency>
5246
<groupId>org.mockito</groupId>
5347
<artifactId>mockito-core</artifactId>
@@ -69,7 +63,13 @@
6963
<scope>test</scope>
7064
</dependency>
7165

72-
<!-- test -->
66+
<dependency>
67+
<groupId>org.junit.jupiter</groupId>
68+
<artifactId>junit-jupiter</artifactId>
69+
<version>${junit.jupiter.version}</version>
70+
<scope>test</scope>
71+
</dependency>
72+
7373
<dependency>
7474
<groupId>org.junit.jupiter</groupId>
7575
<artifactId>junit-jupiter-engine</artifactId>
@@ -180,9 +180,77 @@
180180

181181
</executions>
182182
</plugin>
183+
184+
<!-- Begin publish to maven central -->
185+
<plugin>
186+
<groupId>org.sonatype.plugins</groupId>
187+
<artifactId>nexus-staging-maven-plugin</artifactId>
188+
<version>1.6.7</version>
189+
<extensions>true</extensions>
190+
<configuration>
191+
<serverId>ossrh</serverId>
192+
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
193+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
194+
</configuration>
195+
</plugin>
196+
<!-- End publish to maven central -->
197+
198+
<!-- Begin source & javadocs being generated -->
199+
<plugin>
200+
<groupId>org.apache.maven.plugins</groupId>
201+
<artifactId>maven-source-plugin</artifactId>
202+
<version>2.2.1</version>
203+
<executions>
204+
<execution>
205+
<id>attach-sources</id>
206+
<goals>
207+
<goal>jar-no-fork</goal>
208+
</goals>
209+
</execution>
210+
</executions>
211+
</plugin>
212+
<plugin>
213+
<groupId>org.apache.maven.plugins</groupId>
214+
<artifactId>maven-javadoc-plugin</artifactId>
215+
<version>2.9.1</version>
216+
<executions>
217+
<execution>
218+
<id>attach-javadocs</id>
219+
<goals>
220+
<goal>jar</goal>
221+
</goals>
222+
</execution>
223+
</executions>
224+
</plugin>
225+
<!-- end source & javadoc -->
226+
227+
<!-- sign the jars -->
228+
<plugin>
229+
<groupId>org.apache.maven.plugins</groupId>
230+
<artifactId>maven-gpg-plugin</artifactId>
231+
<version>1.5</version>
232+
<executions>
233+
<execution>
234+
<id>sign-artifacts</id>
235+
<phase>verify</phase>
236+
<goals>
237+
<goal>sign</goal>
238+
</goals>
239+
</execution>
240+
</executions>
241+
</plugin>
242+
<!-- end sign -->
243+
183244
</plugins>
184245
</build>
185246

186247

248+
<distributionManagement>
249+
<snapshotRepository>
250+
<id>ossrh</id>
251+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
252+
</snapshotRepository>
253+
</distributionManagement>
254+
187255

188256
</project>
File renamed without changes.

0 commit comments

Comments
 (0)