Skip to content

Commit

Permalink
Use setup-gradle GitHub action (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
twyatt authored May 20, 2024
1 parent ee41ddc commit 61cb0a9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 38 deletions.
21 changes: 5 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,14 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v3
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'

- name: assemble
uses: gradle/gradle-build-action@v3
with:
arguments: assemble

- name: check
uses: gradle/gradle-build-action@v3
- uses: gradle/actions/setup-gradle@v3
with:
arguments: check
validate-wrappers: true

- name: publishToMavenLocal
uses: gradle/gradle-build-action@v3
with:
arguments: |
-PRELEASE_SIGNING_ENABLED=false
publishToMavenLocal
- run: ./gradlew assemble
- run: ./gradlew check
- run: ./gradlew -PRELEASE_SIGNING_ENABLED=false publishToMavenLocal
25 changes: 10 additions & 15 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,19 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v3
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- uses: gradle/actions/setup-gradle@v3

- name: check
uses: gradle/gradle-build-action@v3
with:
arguments: check

- run: ./gradlew check
- name: publish
uses: gradle/gradle-build-action@v3
with:
arguments: |
-PVERSION_NAME=${{ github.ref_name }}
-PsigningInMemoryKey=${{ secrets.SIGNING_KEY }}
-PsigningInMemoryKeyPassword=${{ secrets.SIGNING_PASSWORD }}
-PmavenCentralUsername=${{ secrets.OSS_SONATYPE_NEXUS_USERNAME }}
-PmavenCentralPassword=${{ secrets.OSS_SONATYPE_NEXUS_PASSWORD }}
publish
run: >
./gradlew
-PVERSION_NAME='${{ github.ref_name }}'
-PsigningInMemoryKey='${{ secrets.SIGNING_KEY }}'
-PsigningInMemoryKeyPassword='${{ secrets.SIGNING_PASSWORD }}'
-PmavenCentralUsername='${{ secrets.OSS_SONATYPE_NEXUS_USERNAME }}'
-PmavenCentralPassword='${{ secrets.OSS_SONATYPE_NEXUS_PASSWORD }}'
publish
13 changes: 6 additions & 7 deletions .github/workflows/signing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v3
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- uses: gradle/actions/setup-gradle@v3

- name: publishToMavenLocal
uses: gradle/gradle-build-action@v3
with:
arguments: |
-PsigningInMemoryKey=${{ secrets.SIGNING_KEY }}
-PsigningInMemoryKeyPassword=${{ secrets.SIGNING_PASSWORD }}
publishToMavenLocal
run: >
./gradlew
-PsigningInMemoryKey='${{ secrets.SIGNING_KEY }}'
-PsigningInMemoryKeyPassword='${{ secrets.SIGNING_PASSWORD }}'
publishToMavenLocal

0 comments on commit 61cb0a9

Please sign in to comment.