Skip to content

Commit 6bc1545

Browse files
authored
Merge pull request #6 from spt-development/feature/upgrade-spring-boot-2.7.2
Updated dependencies to align with Spring Boot 2.7.2
2 parents 370dd5d + 424f65e commit 6bc1545

File tree

7 files changed

+92
-64
lines changed

7 files changed

+92
-64
lines changed

.travis/maven-settings.xml renamed to .github/maven-settings.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
</server>
1212
<server>
1313
<id>github.com</id>
14-
<username>${env.GITHUB_USERNAME}</username>
15-
<password>${env.GITHUB_TOKEN}</password>
14+
<username>${env.GIT_HUB_USERNAME}</username>
15+
<password>${env.GIT_HUB_TOKEN}</password>
1616
</server>
1717
</servers>
1818
<profiles>

.github/workflows/build.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: spt-development-logging-spring
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v3
11+
12+
- name: Set up JDK 18
13+
uses: actions/setup-java@v3
14+
with:
15+
java-version: '18'
16+
distribution: 'adopt'
17+
18+
- name: Build with Maven
19+
run: mvn clean install -B
20+
21+
release:
22+
runs-on: ubuntu-latest
23+
needs: build
24+
if: github.ref == 'refs/heads/main'
25+
26+
steps:
27+
- uses: actions/checkout@v3
28+
29+
- name: Set up JDK 18
30+
uses: actions/setup-java@v3
31+
with:
32+
java-version: '18'
33+
distribution: 'adopt'
34+
35+
- name: Determine version
36+
run: echo "POM_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec | sed -e 's/-SNAPSHOT//')" >> $GITHUB_ENV
37+
38+
- name: Import GPG key
39+
id: import_gpg
40+
uses: crazy-max/ghaction-import-gpg@v5
41+
with:
42+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
43+
passphrase: ${{ secrets.GPG_PASSPHRASE }}
44+
45+
- name: Configure Git User for updating version
46+
run: |
47+
git config user.email "actions@github.com"
48+
git config user.name "GitHub Actions"
49+
50+
- name: Create release
51+
run: mvn --settings .github/maven-settings.xml release:prepare release:perform -DskipTests -Prelease -B
52+
env:
53+
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
54+
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
55+
GIT_HUB_USERNAME: ${{ secrets.GIT_HUB_USERNAME }}
56+
GIT_HUB_TOKEN: ${{ secrets.GIT_HUB_TOKEN }}
57+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
58+
59+
- name: Create GitHub release
60+
id: create_release
61+
uses: actions/create-release@v1
62+
env:
63+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
with:
65+
tag_name: ${{ env.POM_VERSION }}
66+
release_name: ${{ env.POM_VERSION }}
67+
draft: false
68+
prerelease: false
69+
70+
- name: Upload GitHub release asset
71+
id: upload-release-asset
72+
uses: actions/upload-release-asset@v1
73+
env:
74+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75+
with:
76+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
77+
asset_path: target/spt-development-logging-spring-${{ env.POM_VERSION }}.jar
78+
asset_name: spt-development-logging-spring-${{ env.POM_VERSION }}.jar
79+
asset_content_type: application/java-archive

.travis.yml

Lines changed: 0 additions & 53 deletions
This file was deleted.

.travis/gpg.asc.enc

-3.72 KB
Binary file not shown.

README.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
logging-spring -----------------------------------------------------------------
99
````
1010

11-
[![build_status](https://travis-ci.com/spt-development/spt-development-logging-spring.svg?branch=main)](https://travis-ci.com/spt-development/spt-development-logging-spring)
11+
[![build_status](https://github.com/spt-development/spt-development-logging-spring/actions/workflows/build.yml/badge.svg)](https://github.com/spt-development/spt-development-logging-spring/actions)
1212

1313
A library for adding logging (at the start, end and on exception) to public methods of classes annotated with
1414
`@RestController`, `@Service` or `@Repository` or methods annotated with `@JmsListener`.
@@ -50,9 +50,4 @@ To build the library, run the following maven command:
5050
Release
5151
=======
5252

53-
To build a release and upload to Maven Central run the following maven command:
54-
55-
$ export GPG_TTY=$(tty) # Required on Mac OS X
56-
$ mvn deploy -DskipTests -Prelease
57-
58-
NOTE. This is currently a manual step as not currently integrated into the build.
53+
To build a release and upload to Maven Central push to `main`.

maven-version-rules.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
</ignoreVersions>
1313

1414
<rules>
15+
<!-- Dependencies aligned with Spring Boot -->
16+
<rule groupId="org.aspectj" artifactId="aspectjweaver" comparisonMethod="maven">
17+
<ignoreVersions>
18+
<ignoreVersion type="regex">.*</ignoreVersion>
19+
</ignoreVersions>
20+
</rule>
21+
1522
<!-- Test dependencies aligned with Spring Boot -->
1623
<rule groupId="org.mockito" artifactId="mockito-core" comparisonMethod="maven">
1724
<ignoreVersions>

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<!-- Dependency versions -->
3535
<aspectj.version>1.9.7</aspectj.version>
3636
<slf4j.version>1.7.36</slf4j.version>
37-
<spring.version>5.3.20</spring.version>
37+
<spring.version>5.3.22</spring.version>
3838
<spt-cid.version>2.0.11</spt-cid.version>
3939

4040
<!-- Test dependency versions -->
@@ -347,7 +347,7 @@
347347
<version>${maven-release-plugin.version}</version>
348348
<configuration>
349349
<goals>deploy</goals>
350-
<scmCommentPrefix>[skip travis] [maven-release-plugin] </scmCommentPrefix>
350+
<scmCommentPrefix>[skip ci] [maven-release-plugin] </scmCommentPrefix>
351351
<tagNameFormat>@{project.version}</tagNameFormat>
352352
</configuration>
353353
</plugin>

0 commit comments

Comments
 (0)