From e0e12e36d288c09cc1b87ba12cd7017eefe7004b Mon Sep 17 00:00:00 2001 From: cat24a <92937726+cat24a@users.noreply.github.com> Date: Tue, 22 Oct 2024 22:05:41 +0200 Subject: [PATCH] Create build.yml --- .github/workflows/build.yml | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..d2643e7 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,39 @@ +name: Java build with Maven + +on: + push: + branches: [ "*" ] + pull_request: + branches: [ "*" ] + +jobs: + build: + + runs-on: debian-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -B package --file pom.xml + + # Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive + - name: Update dependency graph + uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 + - name: Upload a Build Artifact + uses: actions/upload-artifact@v4.4.3 + with: + # Artifact name + name: build + # A file, directory or wildcard pattern that describes what to upload + path: target/nanoquiz-*-shaded.jar + # The desired behavior if no files are found using the provided path. + if-no-files-found: error + # The level of compression for Zlib to be applied to the artifact archive. The value can range from 0 to 9: - 0: No compression - 1: Best speed - 6: Default compression (same as GNU Gzip) - 9: Best compression Higher levels will result in better compression, but will take longer to complete. For large files that are not easily compressed, a value of 0 is recommended for significantly faster uploads. + compression-level: 0 +