Skip to content

Commit

Permalink
Update gradle workflow action
Browse files Browse the repository at this point in the history
  • Loading branch information
DrewCarlson committed Oct 14, 2024
1 parent a02b46b commit 9dfd08f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
with:
distribution: 'zulu'
java-version: 11
- uses: gradle/actions/setup-gradle@v4

- name: Cache Build files
uses: actions/cache@v4
Expand All @@ -45,10 +46,8 @@ jobs:
~/.gradle
key: ${{ runner.os }}-${{ hashFiles('gradle.properties') }}

- uses: gradle/gradle-build-action@v3
name: Check spotless/ktlint rules
with:
arguments: spotlessCheck
- name: Check spotless/ktlint rules
run: ./gradlew spotlessCheck

api-check:
runs-on: ubuntu-latest
Expand All @@ -61,14 +60,14 @@ jobs:
distribution: 'zulu'
java-version: 11

- uses: gradle/actions/setup-gradle@v4

- name: Cache Build files
uses: actions/cache@v4
with:
path: |
~/.gradle
key: ${{ runner.os }}-${{ hashFiles('gradle.properties') }}

- uses: gradle/gradle-build-action@v3
name: Check public api compatibility
with:
arguments: apiCheck
- name: Check public api compatibility
run: ./gradlew apiCheck
16 changes: 8 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ jobs:
distribution: 'zulu'
java-version: 11

- uses: gradle/actions/setup-gradle@v4

- name: Cache Build files
uses: actions/cache@v4
with:
Expand All @@ -52,10 +54,8 @@ jobs:
~/.gradle
key: ${{ runner.os }}-${{ hashFiles('gradle.properties') }}

- uses: gradle/gradle-build-action@v3
name: Publish
with:
arguments: clean publishAllPublicationsToMavenCentralRepository
- name: Publish
run: ./gradlew clean publishAllPublicationsToMavenCentralRepository

publish-docs:
name: Publish KDoc to Github Pages
Expand All @@ -68,6 +68,8 @@ jobs:
distribution: 'zulu'
java-version: 11

- uses: gradle/actions/setup-gradle@v4

- name: Cache Build files
uses: actions/cache@v4
with:
Expand All @@ -76,10 +78,8 @@ jobs:
~/.gradle
key: ${{ runner.os }}-${{ hashFiles('gradle.properties') }}

- uses: gradle/gradle-build-action@v3
name: Build Docs
with:
arguments: clean dokkaHtmlMultiModule
- name: Build Docs
run: ./gradlew clean dokkaHtmlMultiModule

- name: Publish Docs
uses: JamesIves/[email protected]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ jobs:
distribution: 'zulu'
java-version: 11

- uses: gradle/actions/setup-gradle@v4

- name: Cache Build files
uses: actions/cache@v4
with:
Expand Down

0 comments on commit 9dfd08f

Please sign in to comment.