diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 297cf657..3eba33f3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,8 +6,42 @@ on: - '*' jobs: - release: - name: Test and Upload Release + releaseServer: + name: Server Test and Upload Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v2 + with: + java-version: '17' + distribution: 'adopt' + cache: gradle + - name: Make gradlew executable + run: chmod +x ./gradlew + - name: Validate Gradle wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Clean + run: ./gradlew clean + - name: Test + run: ./gradlew test + - uses: actions/upload-artifact@v2 + if: failure() + with: + name: test_results + path: | + build/reports/tests/** + */build/reports/tests/** + retention-days: 10 + - name: Build + env: + SIGNING_KEY: ${{ secrets.SIGNING_KEY }} + SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} + OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} + OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + run: | + ./gradlew publishMainPublicationToSonatypeRepository + releaseShared: + name: Shared Test and Upload Release runs-on: macos-latest steps: - uses: actions/checkout@v2 @@ -20,6 +54,8 @@ jobs: run: chmod +x ./gradlew - name: Validate Gradle wrapper uses: gradle/wrapper-validation-action@v1 + - name: Clean + run: ./gradlew clean - name: Test run: ./gradlew test - uses: actions/upload-artifact@v2 @@ -36,4 +72,5 @@ jobs: SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} - run: ./gradlew publishAllPublicationsToSonatypeRepository + run: | + ./gradlew shared:publishAllPublicationsToSonatypeRepository diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 53c679ae..11696f07 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -13,8 +13,42 @@ on: - version-** jobs: - release: - name: Test and Upload SnapShot + releaseServer: + name: Server Test and Upload Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v2 + with: + java-version: '17' + distribution: 'adopt' + cache: gradle + - name: Make gradlew executable + run: chmod +x ./gradlew + - name: Validate Gradle wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Clean + run: ./gradlew clean + - name: Test + run: ./gradlew test + - uses: actions/upload-artifact@v2 + if: failure() + with: + name: test_results + path: | + build/reports/tests/** + */build/reports/tests/** + retention-days: 10 + - name: Build + env: + SIGNING_KEY: ${{ secrets.SIGNING_KEY }} + SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} + OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} + OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + run: | + ./gradlew publishMainPublicationToSonatypeRepository + releaseShared: + name: Shared Test and Upload Release runs-on: macos-latest steps: - uses: actions/checkout@v2 @@ -45,4 +79,5 @@ jobs: SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} - run: ./gradlew publishAllPublicationsToSonatypeRepository + run: | + ./gradlew shared:publishAllPublicationsToSonatypeRepository diff --git a/.github/workflows/testPR.yml b/.github/workflows/testPR.yml index e7830642..9c07fe78 100644 --- a/.github/workflows/testPR.yml +++ b/.github/workflows/testPR.yml @@ -7,7 +7,7 @@ on: jobs: test_project: - runs-on: macos-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v2