Alexandre Julliard : gitlab: Add CI script to create a release.
Alexandre Julliard
julliard at winehq.org
Tue Jul 26 15:40:52 CDT 2022
Module: wine
Branch: master
Commit: aa222ccd320db0a4a7955ff4c8c76f230ba4bfcb
URL: https://gitlab.winehq.org/wine/wine/-/commit/aa222ccd320db0a4a7955ff4c8c76f230ba4bfcb
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Jul 26 15:27:46 2022 +0200
gitlab: Add CI script to create a release.
---
.gitlab-ci.yml | 2 ++
tools/gitlab/release.yml | 23 +++++++++++++++++++++++
2 files changed, 25 insertions(+)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 413745f6758..67830facbc6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,7 +3,9 @@
stages:
- image
- build
+ - deploy
include:
- local: "/tools/gitlab/image.yml"
- local: "/tools/gitlab/build.yml"
+ - local: "/tools/gitlab/release.yml"
diff --git a/tools/gitlab/release.yml b/tools/gitlab/release.yml
new file mode 100644
index 00000000000..aee9072bb72
--- /dev/null
+++ b/tools/gitlab/release.yml
@@ -0,0 +1,23 @@
+# CI script for creating releases
+
+create-release:
+ stage: deploy
+ image: registry.gitlab.com/gitlab-org/release-cli:latest
+ rules:
+ - if: $CI_COMMIT_TAG && $CI_PROJECT_PATH == "wine/wine"
+ script:
+ - VERSION=$(expr "$CI_COMMIT_TAG" ":" 'wine-\(.*\)')
+ - URL=$(grep -o "https://dl.winehq.org/.*" ANNOUNCE)
+ - FILEPATH=$(expr "$URL" ":" '.*\(/.*\)')
+ - |
+ sed -e '/^The source/,/^----------/d
+ /^----------/,$d
+ /^Bugs fixed/i--------
+ s/^ *\([0-9][0-9]*\) / - #\1/
+ s/^\*\*\*/###/' ANNOUNCE >announce.md
+ - release-cli create
+ --name "Wine $VERSION"
+ --tag-name "$CI_COMMIT_TAG"
+ --released-at "$CI_COMMIT_TIMESTAMP"
+ --description announce.md
+ --assets-link "{\"name\":\"Source code\",\"url\":\"$URL\",\"link_type\":\"other\",\"filepath\":\"$FILEPATH\"}"
More information about the wine-cvs
mailing list