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>
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user