add zip build to ci

This commit is contained in:
Robert Nasarek 2026-06-25 10:01:49 +02:00
parent 7b210d5257
commit 9b015f4d9a
4 changed files with 67 additions and 7 deletions

41
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,41 @@
stages:
- build
- release
.build-base:
image: node:24-bookworm
before_script:
- apt-get update -qq && apt-get install -y -qq zip
rules:
- if: $CI_COMMIT_TAG
- if: $CI_PIPELINE_SOURCE == "web"
build-library:
extends: .build-base
stage: build
script:
- npm ci
- npm run build:library
- node ./scripts/pack-library.js
artifacts:
paths:
- dfg-3dviewer-library.zip
expire_in: 4 weeks
release-library:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
needs:
- job: build-library
artifacts: true
rules:
- if: $CI_COMMIT_TAG
script:
- echo "Publishing release $CI_COMMIT_TAG"
release:
tag_name: $CI_COMMIT_TAG
name: Release $CI_COMMIT_TAG
assets:
paths:
- path: dfg-3dviewer-library.zip
name: dfg-3dviewer-library.zip