From 2f38ecbed00ecb87ebe912ecc7498ce42d6e3bd9 Mon Sep 17 00:00:00 2001 From: Philipp Stadler <hello@phstadler.com> Date: Thu, 18 Jul 2024 14:22:50 +0200 Subject: [PATCH] refactor: put both changelog and release notes into build stage --- .gitlab-ci.yml | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f071708..972c8d2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -58,6 +58,31 @@ changelog: paths: - CHANGELOG.md +release-notes: + stage: build + rules: + - if: $CI_COMMIT_TAG + needs: + - job: build + artifacts: true + - job: changelog + artifacts: true + variables: + # we just need the artifacts and don't need up-to-date source, so don't even fetch + GIT_STRATEGY: none + # we don't need anything in node_modules or python, so don't fetch the cache + cache: [] + script: + - echo "# $CI_PROJECT_TITLE $CI_COMMIT_TAG" > RELEASE_NOTES.md + - echo "Die APKGs im Pack _${CI_PROJECT_TITLE}_ stehen in der neuen Version $CI_COMMIT_TAG zum Download bereit 🎉" >> RELEASE_NOTES.md + - echo "" >> RELEASE_NOTES.md + - echo "Direkt zur APKG-Liste und Download:" >> RELEASE_NOTES.md + - echo "$ARTIFACTS_URL" >> RELEASE_NOTES.md + - cat CHANGELOG.md >> RELEASE_NOTES.md + artifacts: + paths: + - RELEASE_NOTES.md + release-package-json-version-as-git-tag: stage: release rules: @@ -83,31 +108,6 @@ release-package-json-version-as-git-tag: - ' echo package-json-tag: keeping older tag for $NPM_VERSION' - fi -release-notes: - stage: release - rules: - - if: $CI_COMMIT_TAG - needs: - - job: build - artifacts: true - - job: changelog - artifacts: true - variables: - # we just need the artifacts and don't need up-to-date source, so don't even fetch - GIT_STRATEGY: none - # we don't need anything in node_modules or python, so don't fetch the cache - cache: [] - script: - - echo "# $CI_PROJECT_TITLE $CI_COMMIT_TAG" > RELEASE_NOTES.md - - echo "Die APKGs im Pack _${CI_PROJECT_TITLE}_ stehen in der neuen Version $CI_COMMIT_TAG zum Download bereit 🎉" >> RELEASE_NOTES.md - - echo "" >> RELEASE_NOTES.md - - echo "Direkt zur APKG-Liste und Download:" >> RELEASE_NOTES.md - - echo "$ARTIFACTS_URL" >> RELEASE_NOTES.md - - cat CHANGELOG.md >> RELEASE_NOTES.md - artifacts: - paths: - - RELEASE_NOTES.md - create-gitlab-release: image: registry.gitlab.com/gitlab-org/release-cli:latest stage: release -- GitLab