Skip to content

Commit

Permalink
Update build-commit.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mcbianxiao authored Oct 1, 2024
1 parent 51b487f commit 4809624
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/build-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,27 @@ jobs:
run: ref="${GITHUB_REF#refs/heads/}" && echo "branch=${ref////-}" >> $GITHUB_OUTPUT
id: ref
- name: Checkout sources
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v2
uses: actions/checkout@v4

- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v3

- name: Setup Java 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
distribution: temurin
java-version: 21
- name: Initialize caches
uses: actions/cache@v3

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
path: |
~/.gradle/caches
~/.gradle/loom-cache
~/.gradle/wrapper
key: ${{ runner.os }}-build-commit-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-build-commit-
- name: Build artifacts
cache-read-only: false

- name: Execute Gradle build
run: ./gradlew build

- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: sodium-artifacts-${{ steps.ref.outputs.branch }}
path: build/libs/*.jar

0 comments on commit 4809624

Please sign in to comment.