Skip to content
Snippets Groups Projects
Commit ad0b6b2d authored by Philipp Stadler's avatar Philipp Stadler
Browse files

feat: generate release notes and use them for gitlab release

parent 01c1fbdc
No related branches found
No related tags found
No related merge requests found
......@@ -64,6 +64,31 @@ 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
......@@ -74,6 +99,8 @@ create-gitlab-release:
artifacts: true
- job: changelog
artifacts: true
- job: release-notes
artifacts: true
variables:
# we just need the artifacts and don't need up-to-date source, so don't even fetch
GIT_STRATEGY: none
......@@ -83,8 +110,8 @@ create-gitlab-release:
- echo Creating GitLab release…
release:
tag_name: '$CI_COMMIT_TAG'
name: '$CI_COMMIT_TAG'
description: CHANGELOG.md
name: '$CI_PROJECT_TITLE $CI_COMMIT_TAG'
description: RELEASE_NOTES.md
assets:
links:
- name: 'Browse all APKGS…'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment