build.yaml 821 B

123456789101112131415161718192021222324252627282930
  1. name: Build and publish as artifact
  2. on:
  3. push:
  4. jobs:
  5. run:
  6. runs-on: ubuntu-latest
  7. steps:
  8. - uses: actions/checkout@v2
  9. - name: Set up JDK 17
  10. uses: actions/setup-java@v1
  11. with:
  12. java-version: 17
  13. - uses: actions/cache@v2
  14. with:
  15. path: |
  16. ~/.gradle/caches
  17. ~/.gradle/wrapper
  18. key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
  19. restore-keys: |
  20. ${{ runner.os }}-gradle-
  21. - name: Build
  22. run: ./gradlew build
  23. - name: Upload artifacts
  24. uses: actions/upload-artifact@v2
  25. with:
  26. name: build-artifacts
  27. path: |
  28. forge/build/libs/ferritecore-*-forge.jar
  29. fabric/build/libs/ferritecore-*-fabric.jar