Skip to content

Commit

Permalink
CI split deployment tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
UnknownJoe796 committed Aug 20, 2024
1 parent 88d9009 commit 506da44
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 7 deletions.
43 changes: 40 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
41 changes: 38 additions & 3 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/testPR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 506da44

Please sign in to comment.