From ba78fd6cd737d7a7cf5638daf81cc7bdf8231803 Mon Sep 17 00:00:00 2001 From: Matthieu BENOIST <ext.ausy.mbenoist@grandlyon.com> Date: Tue, 15 Apr 2025 12:54:16 +0000 Subject: [PATCH] initialize ci/cd --- .gitlab-ci.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..5541653 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,36 @@ +image: node:16 + +stages: + - build + - release + +# Build job +build: + stage: build + script: + - npm ci # install deps + - npm run build # Compile + artifacts: + paths: + - dist/ # we save the compiled files in an artefact + expire_in: 1 day + only: + - tags # triggered with tag + +# Release job +release: + stage: release + needs: [build] + image: registry.gitlab.com/gitlab-org/release-cli:latest + script: + - echo "Création de la release pour le tag $CI_COMMIT_TAG" + release: + tag_name: $CI_COMMIT_TAG + name: "Release $CI_COMMIT_TAG" + description: "Release générée automatiquement pour le tag $CI_COMMIT_TAG" + assets: + links: + - name: "Télécharger la version compilée" + url: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/download" + only: + - tags -- GitLab