Build #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Project | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 # Fetch all history for all branches and tags | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x ./gradlew | |
| - name: Build and test all projects | |
| run: ./gradlew build --no-daemon | |
| - name: Test Summary | |
| uses: mikepenz/action-junit-report@v3 | |
| if: always() # always run even if the previous step fails | |
| with: | |
| report_paths: '**/build/test-results/test/TEST-*.xml' | |
| - name: Upload Build Artifacts | |
| uses: actions/upload-artifact@v3 | |
| if: success() | |
| with: | |
| name: build-artifacts | |
| path: | | |
| */build/libs/*.jar | |
| */build/reports/** |