[gnome-shell-extensions] ci: Add dist job



commit 443d1dc42b92fa201aa28e7900416f55555066b3
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Aug 31 11:08:41 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/gnome-shell-extensions/-/merge_requests/186>

 .gitlab-ci.yml | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 297a6bc..92ce01e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,6 +9,7 @@ stages:
   - prepare
   - review
   - build
+  - deploy
 
 default:
   # Cancel jobs if newer commits are pushed to the branch
@@ -143,3 +144,30 @@ fedora-build:
     - meson compile -C build
     - meson test -C build
     - meson install -C build
+  artifacts:
+    paths:
+      - build
+
+fedora-dist:
+  extends:
+    - .fdo.distribution-image@fedora
+    - .gnome-shell-extensions.fedora:34
+  stage: deploy
+  needs:
+    - fedora-build
+  script:
+    - meson dist -C build
+  rules:
+    - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
+      changes:
+        - "**/meson.build"
+        - meson/*
+
+fedora-dist-tarball:
+  extends: fedora-dist
+  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]