Skip to content

Commit

Permalink
ci(gitlab): Reconfigure Maven publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
CLOVIS-AI committed Sep 11, 2023
1 parent 4fdb35d commit 0b3118e
Showing 1 changed file with 91 additions and 0 deletions.
91 changes: 91 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,97 @@ check-js:
interruptible: true

# endregion
# region Publishing

publish-maven:gitlab:
extends: [ .os.gradle ]
needs: [ os.version, check-jvm, check-ios, check-js ]
stage: deploy

script:
- >
./gradlew publishAllPublicationsToGitLabRepository
-PappVersion=$project_version
interruptible: false
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
when: never
- if: $PUBLISH_MAVEN == "manual" || $PUBLISH_MAVEN_GITLAB == "manual"
when: manual
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_TAG

publish-maven:central:
extends: [ .os.gradle ]
needs: [ os.version, check-jvm, check-ios, check-js ]
stage: deploy

script:
- export SIGNING_KEY_RING=$(mktemp)
- <"$SIGNING_KEY_RING_B64" base64 -d >"$SIGNING_KEY_RING"
- >
./gradlew publishAllPublicationsToCentralRepository
-PappVersion=$project_version
interruptible: false
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
when: never
- if: $OSSRH_USERNAME == null || $OSSRH_PASSWORD == null
when: never
- if: $PUBLISH_MAVEN == "manual" || $PUBLISH_MAVEN_CENTRAL == "manual"
when: manual
- if: $CI_COMMIT_TAG

publish-maven:ios:gitlab:
extends: [ .ios ]
needs: [ os.version, check-jvm, check-ios, check-js ]
stage: deploy

script:
- >
./gradlew
publishIosArm64PublicationToGitLabRepository
publishIosSimulatorArm64PublicationToGitLabRepository
publishIosX64PublicationToGitLabRepository
-PappVersion=$project_version
interruptible: false
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
when: never
- if: $PUBLISH_MAVEN == "manual" || $PUBLISH_MAVEN_GITLAB == "manual"
when: manual
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_TAG

publish-maven:ios:central:
extends: [ .os.gradle ]
needs: [ os.version, check-jvm, check-ios, check-js ]
stage: deploy

script:
- export SIGNING_KEY_RING=$(mktemp)
- <"$SIGNING_KEY_RING_B64" base64 -d >"$SIGNING_KEY_RING"
- >
./gradlew
publishIosArm64PublicationToSonatypeRepository
publishIosSimulatorArm64PublicationToSonatypeRepository
publishIosX64PublicationToSonatypeRepository
-PappVersion=$project_version
interruptible: false
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
when: never
- if: $OSSRH_USERNAME == null || $OSSRH_PASSWORD == null
when: never
- if: $PUBLISH_MAVEN == "manual" || $PUBLISH_MAVEN_CENTRAL == "manual"
when: manual
- if: $CI_COMMIT_TAG

# endregion
# region Documentation

Expand Down

0 comments on commit 0b3118e

Please sign in to comment.