[mutter] ci: Add dist job



commit 08a3fc99a2d5288fc057c4cc75e1071d86d15e0b
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Aug 31 11:54:30 2021 +0200

    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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1980>

 .gitlab-ci.yml | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fd876cd9fc..59d139804f 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'


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]