From 08a3fc99a2d5288fc057c4cc75e1071d86d15e0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 31 Aug 2021 11:54:30 +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 | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fd876cd9f..59d139804 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,6 +9,7 @@ stages: - build - test - analyze + - deploy variables: FDO_UPSTREAM_REPO: GNOME/mutter @@ -344,3 +345,28 @@ test-mutter-coverity: key: coverity-tarball paths: - coverity + +dist-mutter: + extends: + - .fdo.distribution-image@fedora + - .mutter.fedora:34@x86_64 + <<: *test-setup + stage: deploy + needs: + - build-mutter@x86_64 + script: + - dbus-run-session -- xvfb-run -a -s "$XVFB_SERVER_ARGS" meson dist -C build + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + changes: + - "**/meson.build" + - meson/* + +dist-mutter-tarball: + extends: dist-mutter + artifacts: + expose_as: 'Get tarball here' + paths: + - build/meson-dist/$CI_PROJECT_NAME-$CI_COMMIT_TAG.tar.xz + rules: + - if: '$CI_COMMIT_TAG'