From e9d646860926daf25598778b28a2ac340674c38a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 31 Aug 2021 13:06:22 +0200 Subject: [PATCH] ci: Add dist job So far, releases are done locally by invoking `meson dist`. We can do better and leverage the existing CI infrastructure, to get to the following release workflow: - bump version in meson.build, update NEWS etc. - open merge request for the release - merge when the pipeline (including dist check) succeeds - tag the release - wait for the tag pipeline to spit out the tarball artifact Part-of: --- .gitlab-ci.yml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cfa438ae0..b12270835 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,7 +31,7 @@ variables: LINT_LOG: "eslint-report.xml" LINT_MR_LOG: "eslint-mr-report.xml" -image: registry.gitlab.gnome.org/gnome/mutter/fedora/34:x86_64-2021-08-25.0 +image: registry.gitlab.gnome.org/gnome/mutter/fedora/34:x86_64-2021-09-04.1 workflow: rules: @@ -259,3 +259,30 @@ nightly: extends: '.publish_nightly' variables: BUNDLES: '$BUNDLE' + +dist: + variables: + XDG_RUNTIME_DIR: "$CI_PROJECT_DIR/runtime-dir" + NO_AT_BRIDGE: "1" + stage: deploy + needs: ["build"] + before_script: + - meson install -C mutter/build + - mkdir -m 700 $XDG_RUNTIME_DIR + script: + - dbus-run-session xvfb-run meson dist -C build + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + changes: + - "**/meson.build" + - meson/* + + +dist-tarball: + extends: dist + artifacts: + expose_as: 'Get tarball here' + paths: + - build/meson-dist/$CI_PROJECT_NAME-$CI_COMMIT_TAG.tar.xz + rules: + - if: '$CI_COMMIT_TAG'