diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..e4dba8421 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,65 @@ +# use Eclipse's JDK +image: gradle:eclipse-temurin +# The ci should always use an unix/unix-like OS to work + + +# all stages need to be defined here +stages: + - build_api_javadoc + +variables: + # Pull any relavent sub-modules when building + GIT_SUBMODULE_STRATEGY: recursive + + +# generate javadocs +build_api_javadoc: + stage: build_api_javadoc + script: + # this should only run for the API + - ./gradlew api:clean --gradle-user-home cache/; + # this also runs unit tests + - ./gradlew api:build --gradle-user-home cache/; + - ./gradlew api:javadoc --gradle-user-home cache/; + image: eclipse-temurin:17 + artifacts: + name: "ApiJavaDoc-${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_TIMESTAMP}" + paths: + - api/build/docs/javadoc + when: always + cache: + key: "gradleCache" + policy: pull-push + paths: + - .gradle + - cache/ + allow_failure: false + + + + + +# unused deployment stage +#deploy: +# stage: deploy +# image: registry.gitlab.com/gitlab-org/release-cli:latest +# script: +# - echo 'running release_job' +# - echo 'Previous Job ID is printed below' +# - echo $GE_JOB_ID +# # Specifying that this job requires artifacts from the previous job to succeed +# needs: +# - job: build +# artifacts: true +# release: +# name: 'Unstable Jars for Latest Commit' #: $CI_COMMIT_SHORT_SHA' +# description: 'Created automatically using the release-cli.' +# # tag_name is a mendatory field and can not be an empty string +# tag_name: 'Unstable-$CI_COMMIT_SHORT_SHA' +# assets: +# links: +# - name: 'Fabric Jars' +# url: 'https://gitlab.com/jeseibel/minecraft-lod-mod/cw/-/jobs/${GE_JOB_ID}/artifacts/file/fabric/build/libs' +# - name: 'Forge Jars' +# url: 'https://gitlab.com/jeseibel/minecraft-lod-mod/cw/-/jobs/${GE_JOB_ID}/artifacts/file/forge/build/libs' +