Skip to content

Commit 19cfb0a

Browse files
committed
Update github workflows
- Upgrade to setup-gradle@v4
1 parent 6b4b20e commit 19cfb0a

File tree

3 files changed

+17
-19
lines changed

3 files changed

+17
-19
lines changed

.github/workflows/docs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,20 @@ jobs:
2121
uses: actions/checkout@v4
2222
with:
2323
token: ${{ secrets.GITHUB_TOKEN }}
24-
- name: Set up JDK
24+
- name: Setup JDK
2525
uses: actions/setup-java@v4
2626
with:
2727
distribution: 'adopt'
2828
java-version: ${{ matrix.java }}
29+
- name: Setup Gradle
30+
uses: gradle/actions/setup-gradle@v4
2931
- name: Get the current version
3032
id: getversion
3133
run: |
3234
echo "$(cat gradle.properties | grep 'projectVersion=' | awk '{print $1}')" >> "$GITHUB_OUTPUT"
3335
- name: Generate Docs
3436
id: build
35-
uses: gradle/actions/setup-gradle@v3
36-
with:
37-
arguments: docs
37+
run: ./gradlew docs
3838
- name: Deploy to GitHub Pages
3939
id: deployment
4040
uses: rainboyan/[email protected]

.github/workflows/gradle.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ jobs:
2424
uses: actions/checkout@v4
2525
with:
2626
token: ${{ secrets.GITHUB_TOKEN }}
27-
- name: Set up JDK
27+
- name: Setup JDK
2828
uses: actions/setup-java@v4
2929
with:
3030
distribution: 'adopt'
3131
java-version: ${{ matrix.java }}
32+
- name: Setup Gradle
33+
uses: gradle/actions/setup-gradle@v4
3234
- name: Run Build
3335
id: build
34-
uses: gradle/gradle-build-action@v3
35-
with:
36-
arguments: build -x codenarcMain -x codenarcTest -x checkstyleMain -x checkstyleTest
36+
run: ./gradlew build -x codenarcMain -x codenarcTest -x checkstyleMain -x checkstyleTest
3737
publish:
3838
if: github.event_name == 'push'
3939
needs: ["build"]
@@ -51,18 +51,19 @@ jobs:
5151
uses: actions/checkout@v4
5252
with:
5353
token: ${{ secrets.GITHUB_TOKEN }}
54-
- name: Set up JDK 17
54+
- name: Setup JDK
5555
uses: actions/setup-java@v4
5656
with:
5757
distribution: 'adopt'
5858
java-version: ${{ matrix.java }}
59+
- name: Setup Gradle
60+
uses: gradle/actions/setup-gradle@v4
5961
- name: Generate secring file
6062
env:
6163
SECRING_FILE: ${{ secrets.SECRING_FILE }}
6264
run: echo $SECRING_FILE | base64 -d > ${{ github.workspace }}/secring.gpg
6365
- name: Publish to Sonatype OSSRH
6466
id: publish
65-
uses: gradle/gradle-build-action@v3
6667
env:
6768
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
6869
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
@@ -71,5 +72,4 @@ jobs:
7172
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
7273
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
7374
SECRING_FILE: ${{ secrets.SECRING_FILE }}
74-
with:
75-
arguments: -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg publishToSonatype closeAndReleaseSonatypeStagingRepository
75+
run: ./gradlew -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg publishToSonatype closeAndReleaseSonatypeStagingRepository

.github/workflows/release.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@ jobs:
3737
with:
3838
token: ${{ secrets.GITHUB_TOKEN }}
3939
- uses: gradle/wrapper-validation-action@v1
40-
- name: Set up JDK
40+
- name: Setup JDK
4141
uses: actions/setup-java@v4
4242
with:
4343
distribution: 'adopt'
4444
java-version: ${{ matrix.java }}
45+
- name: Setup Gradle
46+
uses: gradle/actions/setup-gradle@v4
4547
- name: Extract Target Branch
4648
id: extract_branch
4749
run: |
@@ -54,9 +56,7 @@ jobs:
5456
run: echo "release_version=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
5557
- name: Generate Docs
5658
id: build
57-
uses: gradle/actions/setup-gradle@v3
58-
with:
59-
arguments: docs
59+
run: ./gradlew docs
6060
- name: Deploy to GitHub Pages
6161
id: deployment
6262
uses: rainboyan/[email protected]
@@ -73,7 +73,6 @@ jobs:
7373
- name: Publish to Sonatype OSSRH
7474
id: publish
7575
if: steps.secring.outcome == 'success'
76-
uses: gradle/gradle-build-action@v3
7776
env:
7877
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
7978
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
@@ -82,5 +81,4 @@ jobs:
8281
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
8382
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
8483
SECRING_FILE: ${{ secrets.SECRING_FILE }}
85-
with:
86-
arguments: -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg publishToSonatype closeAndReleaseSonatypeStagingRepository
84+
run: ./gradlew -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg publishToSonatype closeAndReleaseSonatypeStagingRepository

0 commit comments

Comments
 (0)