Commit aa222ccd authored by Alexandre Julliard's avatar Alexandre Julliard

gitlab: Add CI script to create a release.

parent 104d6a12
......@@ -3,7 +3,9 @@
stages:
- image
- build
- deploy
include:
- local: "/tools/gitlab/image.yml"
- local: "/tools/gitlab/build.yml"
- local: "/tools/gitlab/release.yml"
# 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\"}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment