mirror of
https://github.com/Freezy-Studios/BlazeSMP.git
synced 2025-04-22 00:54:04 +02:00
tests
This commit is contained in:
parent
7de12dbb64
commit
63bb1415ab
1 changed files with 58 additions and 27 deletions
45
.github/workflows/gradle.yml
vendored
45
.github/workflows/gradle.yml
vendored
|
@ -18,7 +18,8 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
outputs:
|
||||||
|
jarFiles: ${{ steps.jar_list.outputs.jarFiles }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
@ -30,7 +31,6 @@ jobs:
|
||||||
cache: gradle
|
cache: gradle
|
||||||
|
|
||||||
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
|
# 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
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582
|
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582
|
||||||
|
|
||||||
|
@ -46,9 +46,40 @@ jobs:
|
||||||
- name: Build with Gradle Wrapper
|
- name: Build with Gradle Wrapper
|
||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
|
|
||||||
# Schritt 4: Lade die im build/libs generierten JAR-Dateien als Artifakte hoch.
|
# Speichere das Build-Verzeichnis als Artifakt, damit es im nächsten Job verfügbar ist.
|
||||||
- name: Upload JAR Artifacts
|
- name: Upload build/libs artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: jar-files
|
name: build-libs
|
||||||
path: build/libs/*.jar
|
path: build/libs
|
||||||
|
|
||||||
|
# Ermittle die Liste der erzeugten JAR-Dateien und speichere sie als JSON-Array in den Job-Outputs.
|
||||||
|
- name: Get JAR files list
|
||||||
|
id: jar_list
|
||||||
|
run: |
|
||||||
|
jarFiles=$(find build/libs -maxdepth 1 -name '*.jar' -exec basename {} \; | awk '{printf "\"%s\",", $0}')
|
||||||
|
jarFiles="[${jarFiles%,}]"
|
||||||
|
echo "Found JAR files: $jarFiles"
|
||||||
|
echo "jarFiles=$jarFiles" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
upload:
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
# Erstelle für jede gefundene JAR-Datei einen Matrix-Eintrag.
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
jar: ${{ fromJson(needs.build.outputs.jarFiles) }}
|
||||||
|
steps:
|
||||||
|
# Lade das build/libs-Verzeichnis aus dem Build-Job herunter.
|
||||||
|
- name: Download build/libs artifact
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: build-libs
|
||||||
|
path: build/libs
|
||||||
|
|
||||||
|
# Lade die einzelne JAR-Datei (mit Originalnamen) als Artifakt hoch.
|
||||||
|
- name: Upload artifact for ${{ matrix.jar }}
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.jar }}
|
||||||
|
path: build/libs/${{ matrix.jar }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue