mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-19 17:06:04 -07:00
gitlab: Add CI script to create a release.
This commit is contained in:
parent
104d6a1205
commit
aa222ccd32
2 changed files with 25 additions and 0 deletions
|
@ -3,7 +3,9 @@
|
|||
stages:
|
||||
- image
|
||||
- build
|
||||
- deploy
|
||||
|
||||
include:
|
||||
- local: "/tools/gitlab/image.yml"
|
||||
- local: "/tools/gitlab/build.yml"
|
||||
- local: "/tools/gitlab/release.yml"
|
||||
|
|
23
tools/gitlab/release.yml
Normal file
23
tools/gitlab/release.yml
Normal file
|
@ -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\"}"
|
Loading…
Reference in a new issue