From 443d1dc42b92fa201aa28e7900416f55555066b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 31 Aug 2021 11:08:41 +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 | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 297a6bce..92ce01ed 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'