mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-08-28 00:15:56 +02:00
upgrade actions
This commit is contained in:
parent
41d56ec949
commit
17ee9902b5
1 changed files with 16 additions and 26 deletions
42
.github/workflows/gradle.yml
vendored
42
.github/workflows/gradle.yml
vendored
|
|
@ -27,26 +27,26 @@ jobs:
|
|||
MODRINTH_PLATFORMS: '["spigot", "paper", "purpur", "folia"]'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v6
|
||||
- name: Set up JDKs
|
||||
uses: actions/setup-java@v4
|
||||
uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: |
|
||||
21
|
||||
distribution: 'temurin'
|
||||
cache: gradle
|
||||
|
||||
- name: Cache Gradle wrapper
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/wrapper
|
||||
key: gradle-root-${{ runner.os }}-${{ hashFiles('build.gradle*') }}
|
||||
restore-keys: gradle-root-${{ runner.os }}-
|
||||
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
|
||||
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
|
||||
- name: Make gradlew executable
|
||||
run: chmod +x ./gradlew
|
||||
|
||||
# Setup paperweight cache
|
||||
- name: Cache paperweight
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: |
|
||||
./*/.gradle/caches/paperweight
|
||||
|
|
@ -54,16 +54,6 @@ jobs:
|
|||
restore-keys: |
|
||||
paperweight-submodules-${{ runner.os }}-
|
||||
|
||||
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
|
||||
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
with:
|
||||
cache-provider: basic
|
||||
|
||||
- name: Make gradlew executable
|
||||
run: chmod +x ./gradlew
|
||||
|
||||
- name: Get small commit hash
|
||||
if: ${{ github.event_name != 'release' && success() }}
|
||||
run: echo "SMALL_COMMIT_HASH=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV
|
||||
|
|
@ -73,7 +63,7 @@ jobs:
|
|||
|
||||
# only submit dependency on push
|
||||
- name: Generate and submit dependency graph
|
||||
uses: gradle/actions/dependency-submission@v4
|
||||
uses: gradle/actions/dependency-submission@v6
|
||||
if: ${{ github.event_name == 'push' && success() }}
|
||||
continue-on-error: true
|
||||
|
||||
|
|
@ -89,16 +79,16 @@ jobs:
|
|||
|
||||
# upload the named jars as artifact
|
||||
- name: Upload online JAR artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: CustomAnvil.jar
|
||||
path: build/libs/${{ env.ONLINE_JAR_NAME }}
|
||||
archive: false
|
||||
|
||||
- name: Upload offline JAR file
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: CustomAnvil-offline.jar
|
||||
path: build/libs/${{ env.OFFLINE_JAR_NAME }}
|
||||
archive: false
|
||||
|
||||
- name: Summarize tests results
|
||||
uses: jeantessier/test-summary-action@v1
|
||||
|
|
@ -107,7 +97,7 @@ jobs:
|
|||
# upload the jar to release
|
||||
- name: Upload jar to release
|
||||
if: ${{ github.event_name == 'release' && success() }}
|
||||
uses: softprops/action-gh-release@v2
|
||||
uses: softprops/action-gh-release@v3
|
||||
with:
|
||||
files: |
|
||||
build/libs/${{ env.ONLINE_JAR_NAME }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue