diff --git a/.github/workflows/release-please.yaml b/.github/workflows/release-please.yaml index c992b5e..8dacd4a 100644 --- a/.github/workflows/release-please.yaml +++ b/.github/workflows/release-please.yaml @@ -24,21 +24,24 @@ jobs: upload-release-artifact: needs: release-please runs-on: ubuntu-latest - if: ${{ needs.release-please.outputs.releases_created }} steps: - name: "Check out the repository" + if: ${{ needs.release-please.outputs.releases_created }} uses: actions/checkout@v4 - name: "Setup Java and Maven" + if: ${{ needs.release-please.outputs.releases_created }} uses: actions/setup-java@v4 with: java-version: '21' distribution: 'temurin' - name: "Package JAR using Maven wrapper" + if: ${{ needs.release-please.outputs.releases_created }} run: ./mvnw dependency:go-offline clean compile package - name: "Upload Release Artifact" + if: ${{ needs.release-please.outputs.releases_created }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: gh release upload ${{ steps.release-please.outputs.tag_name }} ./target/shadow-${{ steps.release-please.outputs.major }}.${{ steps.release-please.outputs.minor }}.${{ steps.release-please.outputs.patch }}.jar diff --git a/release-please-config.json b/release-please-config.json index 57ab933..8070d72 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -10,7 +10,7 @@ ], "include-v-in-tag": true, "include-component-in-tag": false, - "pull-request-title-pattern": "chore: release ${version}" + "pull-request-title-pattern": "chore: release ${version}", "label": "autorelease-pending", "release-label": "autorelease-tagged", "bump-minor-pre-major": true, diff --git a/src/main/java/ch/heigvd/dai/utilities/FileManipulator.java b/src/main/java/ch/heigvd/dai/utilities/FileManipulator.java index 084fd3a..49744ee 100644 --- a/src/main/java/ch/heigvd/dai/utilities/FileManipulator.java +++ b/src/main/java/ch/heigvd/dai/utilities/FileManipulator.java @@ -103,7 +103,7 @@ public void writeBytesToFile(byte[] bytes) throws IOException, RuntimeException if (!writeEnabled) throw new RuntimeException( "Unable to write to file, because write operations are not activated for this object."); - + try (FileOutputStream fileOutputStream = new FileOutputStream(file); BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(fileOutputStream)) { bufferedOutputStream.write(bytes);