From b55ea5757a7a8047e93ae8bfec7669c30ca2fe81 Mon Sep 17 00:00:00 2001 From: Suisuroru Date: Mon, 20 Jan 2025 16:57:32 +0800 Subject: [PATCH] ci: fix bug in GitHub Action yml --- .github/workflows/auto_build_jar.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/auto_build_jar.yml b/.github/workflows/auto_build_jar.yml index 9023114..9945e8c 100644 --- a/.github/workflows/auto_build_jar.yml +++ b/.github/workflows/auto_build_jar.yml @@ -92,19 +92,21 @@ jobs: - name: Rename JAR file id: rename_file run: | - TARGET_JAR="BasePlugin-${{ env.VERSION }}.jar" + TARGET_JAR="BasePlugin-${{ env.VERSION }}" SOURCE_JAR=$(find run/plugins -name "*.jar" -print -quit) - mv "${SOURCE_JAR}" "${TARGET_JAR}"\ + echo "FINAL_JAR=${TARGET_JAR}.jar" >> $GITHUB_ENV + echo "FINAL_JAR_NAME=${TARGET_JAR}" >> $GITHUB_ENV + mv "${SOURCE_JAR}" "${{ env.FINAL_JAR }}"\ - name: Archive Artifacts uses: actions/upload-artifact@v4 with: - name: BasePlugin-${{ env.VERSION }} - path: BasePlugin-${{ env.VERSION }}.jar + name: ${{ env.FINAL_JAR_NAME }} + path: ${{ env.FINAL_JAR }} - name: Upload JAR file id: upload_file run: | - gh release upload newest-build ${TARGET_JAR} + gh release upload newest-build ${{ env.FINAL_JAR }} env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}