Skip to content

Commit

Permalink
upgrading actions to v4 to avoid CI/CD warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
andrus committed Apr 20, 2024
1 parent 2f76940 commit 232d9a4
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@ jobs:

steps:
- name: Checkout...
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up JDK...
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'

- name: Retrieve mvn repo cache...
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-build-v3
Expand All @@ -37,30 +38,31 @@ jobs:

steps:
- name: Checkout...
uses: actions/checkout@v2
uses: actions/checkout@v4

# this action exports env.POM_VERSION variable
- name: Export Maven coordinates...
uses: bootique-tools/export-maven-coordinates-action@v1

- name: Set up JDK...
uses: actions/setup-java@v1
uses: actions/setup-java@v4
# skip this for the release versions
if: contains(env.POM_VERSION, '-SNAPSHOT')
with:
java-version: 11
distribution: 'temurin'

- name: Retrieve mvn repo cache...
uses: actions/cache@v2
uses: actions/cache@v4
# skip this for the release versions
if: contains(env.POM_VERSION, '-SNAPSHOT')
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-build-v2
restore-keys: ${{ runner.os }}-maven-v2
restore-keys: ${{ runner.os }}-maven

- name: Deploy...
run: mvn -U clean source:jar-no-fork javadoc:jar deploy -DskipTests --settings .github/workflows/maven_settings.xml
run: mvn clean source:jar-no-fork javadoc:jar deploy -DskipTests --settings .github/workflows/maven_settings.xml
# skip this for the release versions
if: contains(env.POM_VERSION, '-SNAPSHOT')
env:
Expand Down

0 comments on commit 232d9a4

Please sign in to comment.