From 4a5f3849a0cbb9dcd506b5485baf73591ee1e012 Mon Sep 17 00:00:00 2001 From: MengYX Date: Sun, 9 Jan 2022 11:17:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0.gitlab-ci.yml=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..35514ad --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,43 @@ +image: node:16 +cache: + paths: + - node_modules/ + +stages: + - build + + +build-job: + stage: build + script: | + npm config set registry http://mirrors.cloud.tencent.com/npm/ + npm ci + + npm run build + tar -czf legacy.tar.gz -C ./dist . + cd dist + zip -rJ9 ../legacy.zip * + cd .. + + npm run make-extension + cd dist + zip -rJ9 ../extension.zip * + cd .. + + npm run build -- --modern + tar -czf modern.tar.gz -C ./dist . + cd dist + zip -rJ9 ../modern.zip * + cd .. + + sha256sum *.tar.gz *.zip > sha256sum.txt + + artifacts: + name: "$CI_JOB_NAME" + paths: + - legacy.zip + - legacy.tar.gz + - extension.zip + - modern.zip + - modern.tar.gz + - sha256sum.txt