Skip to content

Commit

Permalink
Fix deprecated github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
bjsvedin committed Sep 11, 2024
1 parent b061fe6 commit b8a6fcb
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 31 deletions.
42 changes: 30 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,36 @@ jobs:
name: Server Test and Upload Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2

- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
cache: gradle
- name: Make gradlew executable
run: chmod +x ./gradlew

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

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/actions/wrapper-validation@v4

- name: Clean
run: ./gradlew clean

- name: Test
run: ./gradlew test
- uses: actions/upload-artifact@v2

- uses: actions/upload-artifact@v4
if: failure()
with:
name: test_results
path: |
build/reports/tests/**
*/build/reports/tests/**
retention-days: 10

- name: Build
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
Expand All @@ -40,32 +48,42 @@ jobs:
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
run: |
./gradlew publishMainPublicationToSonatypeRepository
releaseShared:
name: Shared Test and Upload Release
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2

- uses: actions/checkout@v4

- uses: actions/setup-java@v4

with:
java-version: '17'
distribution: 'adopt'
cache: gradle
- name: Make gradlew executable
run: chmod +x ./gradlew

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

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/actions/wrapper-validation@v4

- name: Clean
run: ./gradlew clean

- name: Test
run: ./gradlew test
- uses: actions/upload-artifact@v2

- uses: actions/upload-artifact@v4
if: failure()
with:
name: test_results
path: |
build/reports/tests/**
*/build/reports/tests/**
retention-days: 10

- name: Build
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
Expand Down
41 changes: 29 additions & 12 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,36 @@ jobs:
name: Server Test and Upload Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2

- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
cache: gradle
- name: Make gradlew executable
run: chmod +x ./gradlew

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

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/actions/wrapper-validation@v4

- name: Clean
run: ./gradlew clean

- name: Test
run: ./gradlew test
- uses: actions/upload-artifact@v2

- uses: actions/upload-artifact@v4
if: failure()
with:
name: test_results
path: |
build/reports/tests/**
*/build/reports/tests/**
retention-days: 10

- name: Build
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
Expand All @@ -47,32 +55,41 @@ jobs:
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
run: |
./gradlew publishMainPublicationToSonatypeRepository
releaseShared:
name: Shared Test and Upload Release
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2

- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
cache: gradle
- name: Make gradlew executable
run: chmod +x ./gradlew

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

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/actions/wrapper-validation@v4

- name: Clean
run: ./gradlew clean

- name: Test
run: ./gradlew test
- uses: actions/upload-artifact@v2

- uses: actions/upload-artifact@v4
if: failure()
with:
name: test_results
path: |
build/reports/tests/**
*/build/reports/tests/**
retention-days: 10

- name: Build
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/testPR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,22 @@ jobs:
test_project:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2

- uses: actions/checkout@v4

- uses: actions/setup-java@v4
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: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Run Tests
run: ./gradlew test
- uses: actions/upload-artifact@v2

- uses: actions/upload-artifact@v4
if: failure()
with:
name: commitTestResults
Expand Down

0 comments on commit b8a6fcb

Please sign in to comment.