Skip to content

Commit 26b2361

Browse files
committed
Updating github-actions
1 parent 0d0c0f3 commit 26b2361

File tree

3 files changed

+31
-29
lines changed

3 files changed

+31
-29
lines changed

.github/workflows/maven-release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
name: release
1414

1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
with:
1818
persist-credentials: false # otherwise, the token used is the PA_TOKEN, instead of your personal access token.
1919
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
@@ -27,7 +27,7 @@ jobs:
2727
local-file: true
2828

2929
- name: Set up JDK 17
30-
uses: actions/setup-java@v3
30+
uses: actions/setup-java@v4
3131
with:
3232
java-version: '17'
3333
distribution: 'temurin'
@@ -46,11 +46,11 @@ jobs:
4646
- name: Maven release ${{steps.metadata.outputs.current-version}}
4747
run: |
4848
git checkout -b release
49-
mvn -B -Prelease release:clean release:prepare -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}}
50-
mvn -B -Prelease javadoc:aggregate site:site site:stage
49+
./mvnw -B -Prelease release:clean release:prepare -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}}
50+
./mvnw -B -Prelease javadoc:aggregate site:site site:stage
5151
git checkout ${{vars.GITHUB_BASE_REF}}
5252
git rebase release
53-
mvn -B -Prelease release:perform -DskipTests
53+
./mvnw -B -Prelease release:perform -DskipTests
5454
env:
5555
MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }}
5656
MAVEN_CENTRAL_TOKEN: ${{ secrets.OSS_SONATYPE_PASSWORD }}
@@ -66,14 +66,14 @@ jobs:
6666
token: ${{ secrets.PAGES_DEPLOY_TOKEN }}
6767
#
6868
- name: Push changes to ${{github.ref_name}}
69-
uses: ad-m/github-push-action@v0.6.0
69+
uses: ad-m/github-push-action@v0.8.0
7070
with:
7171
github_token: ${{ secrets.GITHUB_TOKEN }}
7272
branch: ${{github.ref_name}}
7373
force: true
7474

7575
- name: Push tag ${{steps.metadata.outputs.current-version}}
76-
uses: ad-m/github-push-action@v0.6.0
76+
uses: ad-m/github-push-action@v0.8.0
7777
with:
7878
branch: ${{github.ref_name}}
7979
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/maven.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,35 +20,35 @@ jobs:
2020
runs-on: ubuntu-latest
2121
strategy:
2222
matrix:
23-
version: [17,20]
23+
version: [17,21,23]
2424

2525
steps:
26-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@v4
2727
- name: Set up JDK ${{ matrix.version }}
28-
uses: actions/setup-java@v3
28+
uses: actions/setup-java@v4
2929
with:
3030
java-version: ${{ matrix.version }}
3131
distribution: 'temurin'
3232
cache: maven
3333
- name: Build with Maven, Java ${{ matrix.version }}
34-
run: mvn -B package -Dmaven.compiler.source=${{ matrix.version }} -Dmaven.compiler.target=${{ matrix.version }}
34+
run: ./mvnw -B verify -Dmaven.compiler.source=${{ matrix.version }} -Dmaven.compiler.target=${{ matrix.version }}
3535

3636
sonar-build:
3737
needs: build
3838
runs-on: ubuntu-latest
39-
39+
4040
steps:
41-
- uses: actions/checkout@v3
41+
- uses: actions/checkout@v4
4242
with:
4343
fetch-depth: 0
44-
44+
4545
- name: Set up JDK 17 for Sonar-build
46-
uses: actions/setup-java@v3
46+
uses: actions/setup-java@v4
4747
with:
4848
java-version: '17'
4949
distribution: 'temurin'
5050
cache: maven
51-
51+
5252
- name: Cache SonarCloud packages
5353
uses: actions/cache@v3
5454
with:
@@ -68,16 +68,16 @@ jobs:
6868
env:
6969
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
7070
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
71-
run: mvn -B verify -Psonar -Dsonar.projectKey=${{steps.metadata.outputs.sonar-project-key}} sonar:sonar
71+
run: ./mvnw -B verify -Psonar -Dsonar.projectKey=${{steps.metadata.outputs.sonar-project-key}} sonar:sonar
7272

7373
deploy-snapshot:
7474
needs: sonar-build
75+
if: github.event_name != 'pull_request'
7576
runs-on: ubuntu-latest
76-
7777
steps:
78-
- uses: actions/checkout@v3
78+
- uses: actions/checkout@v4
7979
- name: Set up JDK 17 for snapshot release
80-
uses: actions/setup-java@v3
80+
uses: actions/setup-java@v4
8181
with:
8282
java-version: '17'
8383
distribution: 'temurin'
@@ -90,13 +90,13 @@ jobs:
9090

9191
- name: Extract project version
9292
id: project
93-
run: echo ::set-output name=version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
93+
run: echo ::set-output name=version::$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
9494

9595
- name: Deploy Snapshot with Maven, version ${{ steps.project.outputs.version }}
9696
if: ${{endsWith(steps.project.outputs.version, '-SNAPSHOT')}}
9797
run: |
98-
mvn -B -Prelease-snapshot javadoc:aggregate
99-
mvn -B -Prelease-snapshot deploy -Dmaven.test.skip=true
98+
./mvnw -B -Prelease-snapshot javadoc:aggregate
99+
./mvnw -B -Prelease-snapshot deploy -Dmaven.test.skip=true
100100
env:
101101
MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }}
102102
MAVEN_CENTRAL_TOKEN: ${{ secrets.OSS_SONATYPE_PASSWORD }}

pom.xml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66
<parent>
77
<groupId>de.cuioss</groupId>
88
<artifactId>cui-java-parent</artifactId>
9-
<version>0.7.8</version>
10-
<relativePath />
9+
<version>0.8.0</version>
10+
<relativePath/>
1111
</parent>
1212
<artifactId>cui-java-module-template</artifactId>
1313
<name>cui java module template</name>
@@ -19,9 +19,11 @@
1919
<scm>
2020
<url>https://github.com/cuioss/cui-java-module-template/</url>
2121
<connection>
22-
scm:git:https://github.com/cuioss/cui-java-module-template.git</connection>
22+
scm:git:https://github.com/cuioss/cui-java-module-template.git
23+
</connection>
2324
<developerConnection>
24-
scm:git:https://github.com/cuioss/cui-java-module-template/</developerConnection>
25+
scm:git:https://github.com/cuioss/cui-java-module-template/
26+
</developerConnection>
2527
<tag>HEAD</tag>
2628
</scm>
2729
<issueManagement>

0 commit comments

Comments
 (0)