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/-/merge_requests/1968>
This commit is contained in:
Florian Müllner 2021-08-31 13:06:22 +02:00
parent d8b88c24d9
commit e9d6468609

View File

@ -31,7 +31,7 @@ variables:
LINT_LOG: "eslint-report.xml" LINT_LOG: "eslint-report.xml"
LINT_MR_LOG: "eslint-mr-report.xml" LINT_MR_LOG: "eslint-mr-report.xml"
image: registry.gitlab.gnome.org/gnome/mutter/fedora/34:x86_64-2021-08-25.0 image: registry.gitlab.gnome.org/gnome/mutter/fedora/34:x86_64-2021-09-04.1
workflow: workflow:
rules: rules:
@ -259,3 +259,30 @@ nightly:
extends: '.publish_nightly' extends: '.publish_nightly'
variables: variables:
BUNDLES: '$BUNDLE' BUNDLES: '$BUNDLE'
dist:
variables:
XDG_RUNTIME_DIR: "$CI_PROJECT_DIR/runtime-dir"
NO_AT_BRIDGE: "1"
stage: deploy
needs: ["build"]
before_script:
- meson install -C mutter/build
- mkdir -m 700 $XDG_RUNTIME_DIR
script:
- dbus-run-session xvfb-run meson dist -C build
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes:
- "**/meson.build"
- meson/*
dist-tarball:
extends: dist
artifacts:
expose_as: 'Get tarball here'
paths:
- build/meson-dist/$CI_PROJECT_NAME-$CI_COMMIT_TAG.tar.xz
rules:
- if: '$CI_COMMIT_TAG'