diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..89b7cd72d --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,39 @@ +# GitLab CI for FunQuail +# EXPERIMENTAL +image: alpine:3.23 + +variables: + YARN_CACHE_FOLDER: "$CI_PROJECT_DIR/.cache/yarn" + +before_script: + - apk add --no-cache nodejs gzip tar yarn + +# Build the backend +backend: + stage: build + rules: + - if: $CI_COMMIT_BRANCH =~ /(stable|master)/ + - changes: [api/**/*] + script: + - tar czvf funquail-be-${CI_COMMIT_REF_NAME}.tar.gz --owner prometheus --group prometheus --exclude-vcs api/ + artifacts: + name: funquail-be-${CI_COMMIT_REF_NAME}.tar.gz + +# Build the frontend +frontend: + stage: build + rules: + - if: $CI_COMMIT_BRANCH =~ /(stable|master)/ + - changes: [front/**/*] + variables: + NODE_OPTIONS: --max-old-space-size=4096 + before_script: + - cd front + - yarn install --frozen-lockfile + script: + - yarn run build:deployment + after_script: + - cd $OLDPWD + - tar czvf funquail-fe-${CI_COMMIT_REF_NAME}.tar.gz --owner prometheus --group prometheus --exclude-vcs front/dist + artifacts: + name: funquail-fe-${CI_COMMIT_REF_NAME}.tar.gz diff --git a/Taskfile.yml b/Taskfile.yml index 656dc6a43..d88e7458f 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -5,6 +5,9 @@ version: '3' vars: BUILD_DIR: build TASK_LIST: task -l + VERSION: + sh: + - git describe --tags tasks: default: cmds: