Skip to content

Commit ef8e7ba

Browse files
domegabricdecker
authored andcommitted
ci: add build_kotlin job to gitlab ci, make publish manual
1 parent 2b0fc5a commit ef8e7ba

File tree

2 files changed

+29
-6
lines changed

2 files changed

+29
-6
lines changed

gitlab/deploy-maven.yml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
build_kotlin:
2+
stage: build
3+
tags:
4+
- m4
5+
rules:
6+
- if: "$CI_COMMIT_TAG"
7+
- if: '$CI_COMMIT_BRANCH == "master"'
8+
script:
9+
- task build:kotlin
10+
artifacts:
11+
paths:
12+
- libs/gl-sdk-android/lib/src/androidMain/jniLibs
13+
- libs/gl-sdk-android/lib/src/androidMain/kotlin
14+
- libs/gl-sdk-android/lib/src/jvmMain
15+
- libs/gl-sdk-android/lib/src/lib
16+
- libs/gl-sdk-android/lib/src/commonMain
17+
- libs/gl-sdk-android/lib/src/nativeMain
18+
- libs/gl-sdk-android/lib/src/nativeInterop
19+
expire_in: 1 day
20+
121
# maven credentials and gpg settings
222
# in runner's ~/.gradle/gradle.properties
323
publish_to_maven:
@@ -7,7 +27,9 @@ publish_to_maven:
727
rules:
828
- if: "$CI_COMMIT_TAG"
929
when: manual
10-
needs: []
30+
needs:
31+
- job: build_kotlin
32+
artifacts: true
1133
script:
1234
- cd libs/gl-sdk-android
1335
- ./gradlew publish --no-daemon
@@ -24,11 +46,12 @@ publish_snapshot_to_maven:
2446
stage: deploy
2547
tags:
2648
- m4
27-
needs: []
49+
needs:
50+
- job: build_kotlin
51+
artifacts: true
2852
rules:
29-
- if: '$CI_COMMIT_BRANCH == "main"'
30-
when: on_success
31-
- when: manual
53+
- if: '$CI_COMMIT_BRANCH == "master"'
54+
when: manual
3255
script:
3356
- cd libs/gl-sdk-android
3457
- RAW_VERSION=$(grep '^libraryVersion=' gradle.properties | cut -d'=' -f2)

gitlab/functions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ build_ci_image:
2727
changes:
2828
paths:
2929
- docker/ci.Dockerfile
30-
compare_to: main
30+
compare_to: master
3131
script:
3232
- docker pull ${CI_IMAGE}:latest || true
3333
- export IMAGE_TAG=${CI_COMMIT_SHORT_SHA}-$(date +%Y%m%d)

0 commit comments

Comments
 (0)