Update .gitlab-ci.yml file

This commit is contained in:
jastornig 2023-12-20 22:14:24 +00:00
parent c6654d4846
commit c2d4531e82

View file

@ -25,9 +25,7 @@ build_job:
image: "reactnativecommunity/react-native-android:latest" image: "reactnativecommunity/react-native-android:latest"
stage: build # This job runs in the build stage, which runs first. stage: build # This job runs in the build stage, which runs first.
rules: rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push"
when: manual
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_PROTECTED
when: manual when: manual
script: script:
- echo BUILD_JOB_ID=$CI_JOB_ID >> environment.env - echo BUILD_JOB_ID=$CI_JOB_ID >> environment.env
@ -55,9 +53,7 @@ release_job:
needs: needs:
- job: build_job - job: build_job
rules: rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push"
when: on_success
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_PROTECTED
when: on_success when: on_success
release: release:
tag_name: 'v0.$CI_PIPELINE_IID' tag_name: 'v0.$CI_PIPELINE_IID'