forked from StarOpenSource/Engine
77 lines
2.5 KiB
YAML
77 lines
2.5 KiB
YAML
name: "PRs & Pushes"
|
|
|
|
on:
|
|
- push
|
|
- pull_request
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: docker
|
|
container:
|
|
image: git.staropensource.de/infrastructure/actions-docker:java
|
|
steps:
|
|
- name: Checkout
|
|
uses: https://code.forgejo.org/actions/checkout@v4
|
|
- name: Restore Gradle cache
|
|
uses: actions/cache/restore@v4
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
restore-keys: |
|
|
gradle-${{ runner.os }}-
|
|
- name: Compile
|
|
run: ./gradlew --no-daemon -Pjava.skipToolchainSpecification=true jar
|
|
- name: Save Gradle cache
|
|
uses: actions/cache/save@v4
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
restore-keys: |
|
|
gradle-${{ runner.os }}-
|
|
- name: Upload JARs
|
|
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
|
with:
|
|
name: jars-libraries
|
|
path: |
|
|
**/build/libs/*.jar
|
|
if-no-files-found: error
|
|
build-apidoc:
|
|
runs-on: docker
|
|
container:
|
|
image: git.staropensource.de/infrastructure/actions-docker:java
|
|
steps:
|
|
- name: Checkout
|
|
uses: https://code.forgejo.org/actions/checkout@v4
|
|
- name: Restore Gradle cache
|
|
uses: actions/cache/restore@v4
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
restore-keys: |
|
|
gradle-${{ runner.os }}-
|
|
- name: Compile
|
|
run: ./gradlew --no-daemon -Pjava.skipToolchainSpecification=true dokkaHtml dokkaHtmlMultiModule dokkaHtmlJar dokkaJavadocJar
|
|
- name: Save Gradle cache
|
|
uses: actions/cache/save@v4
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
restore-keys: |
|
|
gradle-${{ runner.os }}-
|
|
- name: Upload JARs
|
|
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
|
with:
|
|
name: jars-libraries
|
|
path: |
|
|
build/dokka/htmlMultiModule
|
|
**/build/dokka/html
|
|
**/build/libs/*.jar
|
|
if-no-files-found: error
|