From 33414287c73658df60cc7f258787967c61d66cd5 Mon Sep 17 00:00:00 2001 From: Bill Date: Fri, 4 Oct 2024 17:30:09 -0400 Subject: [PATCH] maybe this time --- .github/workflows/build.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fcc6e1b6..db709ea0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,17 +51,21 @@ jobs: - name: Build with Maven run: mvn clean package --file pom.xml - # Step 6: Rename the JAR file + # Step 6: List the contents of the target directory for debugging + - name: List target directory + run: ls -la target + + # Step 7: Rename the JAR file - name: Rename JAR file run: | - # Set the base name of the JAR file - BASE_JAR="SensibleToolbox-Reborn" - # Get the current version - CURRENT_VERSION="${{ env.NEW_VERSION }}" - # Get the new JAR file name - mv "${BASE_JAR}-${CURRENT_VERSION#Reborn }.jar" "SensibleToolbox v${CURRENT_VERSION}.jar" + # Find the generated JAR file + JAR_FILE=$(ls target/*.jar | head -n 1) # Get the first jar file in target + echo "Found JAR file: $JAR_FILE" + + # Rename it + mv "$JAR_FILE" "SensibleToolbox v${{ env.NEW_VERSION }}.jar" - # Step 7: Create a release with the JAR + # Step 8: Create a release with the JAR - name: Create Release uses: softprops/action-gh-release@v1 with: @@ -71,4 +75,4 @@ jobs: body: | Release of version v${{ env.NEW_VERSION }}. env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file