From bde53c25dc266f052a2f244ba1cdc7f333c58218 Mon Sep 17 00:00:00 2001
From: Serge Bazanski <q3k@q3k.org>
Date: Sun, 13 Aug 2023 17:44:13 +0200
Subject: [PATCH] ci: attempt to fix dist job for tags

---
 .gitlab-ci.yml | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 800b68081e..1e4fb0fcd9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -73,13 +73,27 @@ pages:
     paths: ['public']
     expire_in: 1d
 
-dist:
+dist-branch:
   stage: deploy
   variables:
     # Force a full clone to make version machinery work.
     GIT_STRATEGY: clone
   only:
-    - /^release\/[0-9]+\.[0-9]+\.[0-9]+.*$/
+    - /^release\/[0-9]+\.[0-9]+\.[0-9]+$/
+    - branches
+  script:
+    - bash tools/dist.sh
+  artifacts:
+    paths: ['dist']
+
+dist-tag:
+  stage: deploy
+  variables:
+    # Force a full clone to make version machinery work.
+    GIT_STRATEGY: clone
+  only:
+    - /^v\/[0-9]+\.[0-9]+\.[0-9]+.*$/
+    - tags
   script:
     - bash tools/dist.sh
   artifacts:
-- 
GitLab