improve lib publishing

This commit is contained in:
jem 2022-02-01 09:30:38 +01:00
parent 9fede2683f
commit a8b5bb3adf

View file

@ -55,15 +55,29 @@ test:
junit: build/test-results/test/TEST-*.xml
publish-snapshot:
publish-snapshot-lib:
stage: publish
rules:
- if: $CI_COMMIT_TAG !~ /^release-[0-9]+[.][0-9]+([.][0-9]+)?$/
script:
- ./gradlew -x assemble -x test jar
- ./gradlew -x assemble -x test publish
artifacts:
paths:
- build/libs/*.jar
publish-released-lib:
stage: publish
rules:
- if: $CI_PIPELINE_SOURCE != "push"
when: never
- if: $CI_COMMIT_TAG =~ /^release-[0-9]+[.][0-9]+([.][0-9]+)?$/
script:
- ./gradlew -x assemble -x test jar
- ./gradlew -x assemble -x test publish
artifacts:
paths:
- build/libs/*.jar
expire_in: 2 months
.fatjars: