From 6f39abe14a429653746c9288b212635f4b3c2234 Mon Sep 17 00:00:00 2001 From: Artur Khusainov Date: Sat, 20 Jan 2024 23:27:21 +0300 Subject: [PATCH] Submit Dependency Graph (#82) --- .github/workflows/build.yml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2be37e6..a2d6d67 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,6 +13,9 @@ on: description: Path to the jar artifact value: ${{ jobs.build.outputs.artifact }} +permissions: + contents: write + jobs: build: name: Gradle build @@ -23,25 +26,25 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' - name: Validate Gradle wrapper uses: gradle/wrapper-validation-action@v1 + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + with: + dependency-graph: generate-and-submit - name: Determine target Spigot version id: target run: | TARGET=${{ inputs.spigot-target }} [[ -z "$TARGET" ]] && TARGET=$(tail -n1 VERSIONS.txt) echo "spigot-version=$TARGET" >> $GITHUB_OUTPUT - - uses: gradle/gradle-build-action@v2 - with: - arguments: | - build - -Pversion=${{ inputs.version }} - -Pspigot_version=${{ steps.target.outputs.spigot-version }} - -PprotocolLib_version=4.2.1 + - name: Run the build + run: | + ./gradlew \ + build \ + -Pversion=${{ inputs.version }} \ + -Pspigot_version=${{ steps.target.outputs.spigot-version }} \ + -PprotocolLib_version=4.2.1 - name: Force original path preservation (for upload-artifact@v3) run: touch .empty - uses: actions/upload-artifact@v4