stages: - test - npm - build test: stage: test image: node:22 tags: - docker script: - npm ci - npm run test:ci build: stage: build only: - /main/ before_script: - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry2.24hr.se - docker login -u 24hrservice -p $DOCKER_PASSWORD script: - export TERM=xterm-256color - make ci npm: stage: npm image: node:22 tags: - docker rules: - if: '$CI_COMMIT_BRANCH == "main"' script: - npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN} - npm ci - npm run build - npm publish --access public