[polari] ci: Add dist job



commit 608b2a936c7c95d518a2495ee801751b7d563473
Author: Florian Müllner <fmuellner gnome org>
Date:   Mon Aug 30 15:48:28 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/polari/-/merge_requests/220>

 .gitlab-ci.yml | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 65d85a98..5e929bfa 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -173,6 +173,32 @@ fedora-build:
     - meson compile -C build
     - meson test -C build
     - meson install -C build
+  artifacts:
+    paths:
+      - build
+
+fedora-dist:
+  extends:
+    - .fdo.distribution-image@fedora
+    - .polari.fedora:34
+  stage: deploy
+  needs:
+    - fedora-build
+  script:
+    - meson dist -C build
+  rules:
+    - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
+      changes:
+        - meson.build
+
+fedora-dist-tarball:
+  extends: fedora-dist
+  artifacts:
+    expose_as: 'Get tarball here'
+    paths:
+      - build/meson-dist/$CI_COMMIT_TAG.tar.xz
+  rules:
+    - if: '$CI_COMMIT_TAG'
 
 check-flatpak-deps:
   image:


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