diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d78b410997e75b17b54d3f8d48a25f54c4a49dbd..45af95a7cab8a5835ce5bca667fc9ac7e0d65563 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,6 @@ image: durcheinander/sinologie-anki-pack-build:latest stages: - - housekeeping - lint - build - prepare-release @@ -45,8 +44,8 @@ build-release: release-package-json-version-as-git-tag: stage: release rules: - - if: $CI_PIPELINE_SOURCE != "schedule" - - if: $CI_COMMIT_BRANCH == "refs/head/main" + # tagging should only happen after the thing was merged + - if: $CI_PIPELINE_SOURCE != "schedule" && $CI_COMMIT_BRANCH == "main" script: - NPM_VERSION=$(grep '"version":' package.json -m 1 | cut -d '"' -f 4) # || exit_code=$? is the recommended way to ignore a non-zero exit code @@ -108,25 +107,4 @@ create-gitlab-release: links: - name: "$RELEASE_ZIP" url: '$RELEASE_ZIP_DOWNLOAD_URL' - -# we don't want to get logged out, so I send messages to myself once a day -whatsapp-ping: - stage: housekeeping - rules: - - if: $CI_PIPELINE_SOURCE == "schedule" - script: - - mudslide --cache .build-cache login || exit_code=$? - - mudslide --cache .build-cache send me "Good News! You are still logged in at Uni Wien CI." - -notify: - stage: notify - rules: - - if: $CI_COMMIT_TAG - needs: - - job: prepare-gitlab-release - artifacts: true - script: - # the command fails even if it succeeds sometimes - - mudslide --cache .build-cache login || exit_code=$? - - 'mudslide --cache .build-cache send $WHATSAPP_RELEASE_NOTIFY_RECIPIENT "Sinologie Anki Pack $NPM_VERSION ist released! 🎉\nDownload: $RELEASE_ZIP_DOWNLOAD_URL\nDetails zum Release: https://gitlab.phaidra.org/kartenaale/sinologie-anki-pack/-/releases\nViel Spaß beim lernen!"' \ No newline at end of file