Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
kdubb committed Aug 2, 2024
1 parent a3ea042 commit 2371460
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 52 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: '11'
distribution: adopt
java-version: '21'
distribution: temurin

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Build & Test
uses: burrunan/gradle-cache-action@v1
run: ./gradlew check sonar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
job-id: jdk11-build-test
arguments: check sonar

- name: Report Tests
uses: dorny/test-reporter@v1
Expand Down
53 changes: 24 additions & 29 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,34 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: '11'
distribution: adopt
java-version: '21'
distribution: temurin

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Build Artifacts & Documentation
uses: burrunan/gradle-cache-action@v1
with:
job-id: jdk11-build-test
arguments: build dokkaHtmlMultiModule -x test
properties: |
releaseVersion=${{ github.ref_name }}
run: >-
./gradlew
-PreleaseVersion=${{ github.ref_name }}
build dokkaHtmlMultiModule
-x test
- name: Publish Maven Release
uses: burrunan/gradle-cache-action@v1
run: >-
./gradlew
-PreleaseVersion=${{ github.ref_name }}
-PsonatypeUsername=${{ secrets.OSSRH_USER }} -PsonatypePassword=${{ secrets.OSSRH_PASS }}
publishToSonatype closeAndReleaseSonatypeStagingRepository
-x test
env:
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.OSSRH_GPG_SECRET_KEY_ID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
with:
job-id: jdk11-build-test
arguments: publishToSonatype closeAndReleaseSonatypeStagingRepository -x test
properties: |
releaseVersion=${{ github.ref_name }}
sonatypeUsername=${{ secrets.OSSRH_USER }}
sonatypePassword=${{ secrets.OSSRH_PASS }}

- name: Publish Documentation
uses: JamesIves/github-pages-deploy-action@v4
Expand All @@ -54,14 +54,9 @@ jobs:
folder: build/dokka

- name: Publish GitHub Release
uses: burrunan/gradle-cache-action@v1
env:
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.OSSRH_GPG_SECRET_KEY_ID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
with:
job-id: jdk11-build-test
arguments: githubRelease -x test
properties: |
releaseVersion=${{ github.ref_name }}
github.token=${{ secrets.GITHUB_TOKEN }}
run: >-
./gradlew
-PreleaseVersion=${{ github.ref_name }}
-Pgithub.token=${{ secrets.GITHUB_TOKEN }}
githubRelease
-x test
28 changes: 13 additions & 15 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,25 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: '11'
distribution: adopt
java-version: '21'
distribution: temurin

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Build Artifacts & Documentation
uses: burrunan/gradle-cache-action@v1
with:
job-id: jdk11-build-test
arguments: build dokkaHtmlMultiModule -x test
run: ./gradlew build dokkaHtmlMultiModule -x test

- name: Publish Maven Artifacts (Snapshot)
uses: burrunan/gradle-cache-action@v1
with:
job-id: jdk11-build-test
arguments: publishToSonatype
properties: |
sonatypeUsername=${{ secrets.OSSRH_USER }}
sonatypePassword=${{ secrets.OSSRH_PASS }}
run: >-
./gradlew
-PsonatypeUsername=${{ secrets.OSSRH_USER }}
-PsonatypePassword=${{ secrets.OSSRH_PASS }}
publishToSonatype
- name: Publish Documentation
uses: JamesIves/github-pages-deploy-action@v4
Expand Down

0 comments on commit 2371460

Please sign in to comment.