Skip to content

Commit

Permalink
Update CI workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
LambdAurora committed Feb 5, 2024
1 parent 198fbb5 commit 4e30f7b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 19 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,29 @@ jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: "Checkout"
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v3
- name: "Set up Java"
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: 17
- name: Gradle Build
uses: gradle/gradle-build-action@v2
with:
arguments: build check --stacktrace --parallel
- name: "Set up Gradle"
uses: gradle/actions/setup-gradle@v3
- name: "Gradle Build"
run: ./gradlew build check --stacktrace --parallel
env:
ACTIONS_REF: ${{ github.ref }}
- uses: actions/upload-artifact@v3
- name: "Upload artifacts"
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: ./build/libs/

- name: Gradle Publish
uses: gradle/gradle-build-action@v2
with:
arguments: publish publishToSonatype closeAndReleaseSonatypeStagingRepository --stacktrace
- name: "Gradle Publish"
run: ./gradlew publish publishToSonatype closeAndReleaseSonatypeStagingRepository --stacktrace
env:
ACTIONS_REF: ${{ github.ref }}
ORG_GRADLE_PROJECT_mavenCentralKey: ${{ secrets.MAVEN_CENTRAL_PUBLISH_KEY }}
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,21 @@ jobs:
java: [17, 21]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: "Checkout"
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v3
- name: "Set up Java"
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: ${{ matrix.java }}
- name: Gradle Build and Test
uses: gradle/gradle-build-action@v2
- name: "Set up Gradle"
uses: gradle/actions/setup-gradle@v3
- name: "Gradle Build and Test"
run: ./gradlew build check --stacktrace --parallel
- name: "Upload artifacts"
uses: actions/upload-artifact@v4
with:
arguments: build check --stacktrace --parallel
- uses: actions/upload-artifact@v3
with:
name: Artifacts
name: Artifacts_j${{ matrix.java }}
path: ./build/libs/

0 comments on commit 4e30f7b

Please sign in to comment.