Skip to content

Commit

Permalink
Upgrade GitHub actions
Browse files Browse the repository at this point in the history
- actions/checkout v4
- actions/setup-java v4
- actions/cache v4
- gradle/actions/setup-gradle v3
  • Loading branch information
guillermocalvo committed Feb 11, 2024
1 parent 2e2ae3c commit 18f154d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ jobs:
# ================================
- name: Shallow clone
if: ${{ matrix.jdk != 21 }}
uses: actions/checkout@v3
uses: actions/checkout@v4

# ================================
# CHECKOUT
# ================================
- name: Checkout git branch
if: ${{ matrix.jdk == 21 }}
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Fetch all history for all tags and branches (recommended by SonarQube)
fetch-depth: 0
Expand All @@ -44,7 +44,7 @@ jobs:
# SET UP JDK
# ================================
- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-package: jdk
Expand All @@ -54,7 +54,7 @@ jobs:
# CACHE SONARCLOUD PACKAGES
# ================================
- name: Cache SonarCloud packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: ${{ runner.os }}-sonar
path: |
Expand All @@ -66,23 +66,23 @@ jobs:
# SETUP GRADLE
# ================================
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}

# ================================
# BUILD
# ================================
- name: Build
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
arguments: build -x check --info --scan

# ================================
# CHECK
# ================================
- name: Check
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
arguments: check --info --scan

Expand All @@ -101,6 +101,6 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: https://sonarcloud.io
SONAR_ORGANIZATION: leakyabstractions
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
arguments: sonarqube --info --scan
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ jobs:
# CHECKOUT
# ================================
- name: Checkout git tag
uses: actions/checkout@v3
uses: actions/checkout@v4

# ================================
# SET UP JDK
# ================================
- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-package: jdk
Expand All @@ -48,6 +48,6 @@ jobs:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypeStagingProfileId: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
arguments: publish -Prelease --info --scan
2 changes: 1 addition & 1 deletion .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ jobs:
ORG_GRADLE_PROJECT_githubPassword: ${{ secrets.PUBLISH_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
arguments: publish -Psnapshot --info --scan

0 comments on commit 18f154d

Please sign in to comment.