From fe624697b49426e026fc089bf8b2062d5b03d7b6 Mon Sep 17 00:00:00 2001 From: DancingSnow <60736156+DancingSnow0517@users.noreply.github.com> Date: Wed, 8 May 2024 15:01:08 +0800 Subject: [PATCH] Update ci.yml --- .github/workflows/ci.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4609017..a237183 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: - name: checkout uses: actions/checkout@v3.1.0 - name: validate gradle wrapper - uses: gradle/wrapper-validation-action@v1 + uses: gradle/actions/wrapper-validation@v3 - name: Setup Java 17 uses: actions/setup-java@v3.6.0 with: @@ -37,21 +37,27 @@ jobs: - name: make gradle wrapper executable if: ${{ runner.os != 'Windows' }} run: chmod +x ./gradlew + - name: Build with Gradle + uses: gradle/actions/setup-gradle@v3 - name: Build - uses: gradle/gradle-build-action@v2.4.2 env: GITHUB_RUN_NUMBER: ${{ vars.GITHUB_RUN_NUMBER }} + run: ./gradlew build + - name: Read Properties + id: 'properties' + uses: christian-draeger/read-properties@1.1.1 with: - arguments: build + path: gradle.properties + properties: 'mod_id mod_name' - name: Get Version id: version run: | - version=$(ls forge/build/libs/* | grep sources.jar -v | grep shadow.jar -v | grep slim.jar -v | awk -F 'examplemod-forge-|.jar' '{print $2}') + version=$(ls forge/build/libs/* | grep sources.jar -v | grep shadow.jar -v | grep slim.jar -v | awk -F '${{ steps.properties.outputs.mod_id }}-forge-|.jar' '{print $2}') echo version=$version >> $GITHUB_OUTPUT - name: capture build artifacts uses: actions/upload-artifact@v3.1.1 with: - name: ExampleMod-${{ steps.version.outputs.version }} + name: "${{ steps.properties.outputs.mod_name }}-${{ steps.version.outputs.version }}" path: | fabric/build/libs/*.jar forge/build/libs/*.jar