Skip to content

Commit ac2949c

Browse files
authored
Update Maven build, Github Action plug-in versions; enable Dependabot for auto-update of latter (#88)
1 parent 0820590 commit ac2949c

File tree

3 files changed

+23
-13
lines changed

3 files changed

+23
-13
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
groups:
8+
github-actions:
9+
patterns:
10+
- "*"

.github/workflows/main.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
pull_request:
1010
branches:
1111
- master
12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
build:
1417
runs-on: ${{ matrix.os }}
@@ -21,37 +24,34 @@ jobs:
2124
env:
2225
JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
2326
steps:
24-
- uses: actions/checkout@v3
27+
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
2528
- name: Set up JDK
26-
uses: actions/setup-java@v3
29+
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
2730
with:
2831
distribution: 'temurin'
2932
java-version: ${{ matrix.java_version }}
3033
cache: 'maven'
3134
server-id: sonatype-nexus-snapshots
3235
server-username: CI_DEPLOY_USERNAME
3336
server-password: CI_DEPLOY_PASSWORD
34-
# See https://github.com/actions/setup-java/blob/v2/docs/advanced-usage.md#Publishing-using-Apache-Maven
35-
# gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
36-
# gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
37-
- name: Build project
37+
- name: Build
3838
run: ./mvnw -B -q -ff -ntp verify
3939
- name: Extract project Maven version
4040
id: projectVersion
41-
run: echo ::set-output name=version::$(./mvnw org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -DforceStdout -Dexpression=project.version -q)
41+
run: echo "version=$(./mvnw org.apache.maven.plugins:maven-help-plugin:3.4.1:evaluate -DforceStdout -Dexpression=project.version -q)" >> $GITHUB_OUTPUT
4242
- name: Deploy snapshot
43-
if: github.event_name != 'pull_request' && matrix.java_version == '8' && endsWith(steps.projectVersion.outputs.version, '-SNAPSHOT')
43+
if: ${{ github.event_name != 'pull_request' && matrix.java_version == '8' && endsWith(steps.projectVersion.outputs.version, '-SNAPSHOT') }}
4444
env:
4545
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
4646
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}
4747
# MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
4848
run: ./mvnw -B -q -ff -DskipTests -ntp source:jar deploy
4949
- name: Generate code coverage
50-
if: github.event_name != 'pull_request' && matrix.java_version == '8'
50+
if: ${{ github.event_name != 'pull_request' && matrix.java_version == '8' }}
5151
run: ./mvnw -B -q -ff -ntp test
5252
- name: Publish code coverage
53-
if: github.event_name != 'pull_request' && matrix.java_version == '8'
54-
uses: codecov/codecov-action@v1
53+
if: ${{ github.event_name != 'pull_request' && matrix.java_version == '8' }}
54+
uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c # v4.4.1
5555
with:
5656
token: ${{ secrets.CODECOV_TOKEN }}
5757
file: ./target/site/jacoco/jacoco.xml

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.fasterxml</groupId>
66
<artifactId>oss-parent</artifactId>
7-
<version>44</version>
7+
<version>58</version>
88
</parent>
99

1010
<artifactId>aalto-xml</artifactId>
@@ -82,7 +82,7 @@ org.xml.sax, org.xml.sax.ext, org.xml.sax.helpers</osgi.import>
8282
<dependency>
8383
<groupId>com.fasterxml.woodstox</groupId>
8484
<artifactId>woodstox-core</artifactId>
85-
<version>6.2.6</version>
85+
<version>6.6.2</version>
8686
<scope>test</scope>
8787
</dependency>
8888
</dependencies>

0 commit comments

Comments
 (0)