stages: - build - publish image: node:lts-alpine3.14 variables: DOCKER_DRIVER: overlay2 # For internal build & publish # .repo-configuration: &configure-npm-repo # Configure internal repo # - npm config set strict-ssl false # - npm config set registry $NPM_REGISTRY # - npm config set ca null # - npm config set always-auth true # - npm config set _auth $NPM_TOKEN build: stage: build # variables: # NPM_REGISTRY: $NPM_PRIVATE_REGISTRY # NPM_TOKEN: $NPM_PRIVATE_TOKEN before_script: - npm -v - node -v - npm i -g gulp # - *configure-npm-repo script: - npm i - npm list - gulp build-prod artifacts: expire_in: 1 hour paths: - build - node_modules publish-public: stage: publish dependencies: - build before_script: - npm i -g gulp - npm config set //registry.npmjs.org/:_authToken $NPM_PUBLIC_TOKEN script: - gulp publish --access public