From 9824b4769cd701aa3d855f351465418718b6c8c2 Mon Sep 17 00:00:00 2001
From: Philipp Stadler <hello@phstadler.com>
Date: Sat, 20 Jul 2024 20:57:51 +0200
Subject: [PATCH] chore: add prepare stage for jsonp

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

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 655c741..f126cde 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,9 +1,25 @@
 image: durcheinander/pack-build:1.1.0
 
 stages:
+- prepare
 - build
 - release
 
+prepare:
+  stage: prepare
+  rules:
+    - if: $CI_PIPELINE_SOURCE == "schedule"
+      when: never
+    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
+    - if: $CI_COMMIT_TAG
+    - exists:
+      - resources
+  script:
+    - to-static-jsonp --fn hd resources/* -o .
+  artifacts:
+    paths:
+      - '*.js'
+
 build:
   image: durcheinander/export-apkgs:2.0.0
   stage: build
-- 
GitLab