maven.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. name: Build
  2. on:
  3. push:
  4. pull_request:
  5. types: [opened, synchronize, reopened]
  6. # Allows you to run this workflow manually from the Actions tab
  7. workflow_dispatch:
  8. jobs:
  9. pre_job:
  10. runs-on: ubuntu-latest
  11. outputs:
  12. should_skip: ${{ steps.skip_check.outputs.should_skip }}
  13. steps:
  14. - id: skip_check
  15. uses: fkirc/skip-duplicate-actions@master
  16. with:
  17. concurrent_skipping: 'same_content_newer'
  18. skip_after_successful_duplicate: 'true'
  19. build:
  20. needs: pre_job
  21. if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
  22. runs-on: ubuntu-latest
  23. steps:
  24. - uses: actions/checkout@v3
  25. - name: Set up JDK
  26. uses: actions/setup-java@v3
  27. with:
  28. java-version: 17
  29. distribution: 'temurin'
  30. - name: Run Tests
  31. run: mvn verify -B -U
  32. - name: Build Assembly
  33. run: mvn clean package assembly:single
  34. - name: Upload Assembly
  35. uses: actions/upload-artifact@v3
  36. with:
  37. name: "JPlag"
  38. path: "jplag.cli/target/jplag-*-jar-with-dependencies.jar"