Skip to content
Snippets Groups Projects
Select Git revision
  • bb2cd389615d420eb5d3cb2bf0ad0aea7ddd6982
  • master default protected
2 results

.gitlab-ci.yml

Blame
  • user avatar
    ko_oler authored
    bb2cd389
    History
    .gitlab-ci.yml 751 B
    stages:
      - publish-npm
    
    publish_npm:
      image: "node:current-alpine"
      stage: publish-npm
      before_script:
        - apk add --update bash
        - apk add --update make
        - apk add --update yarn
        - apk add --update jq
        - apk add --update protobuf-dev
      rules:
        - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
          changes:
            - config/package.json
      script:
        - npm install -g typescript@4.7.4
        - npm install -g ts-proto@1.115.5
        - cd ./config
        - mkdir clients
        - ls
        - make proto
        - NPM_PACKAGE_VERSION=$(node -p "require('./package.json').version")
        - yarn pub
        - echo "Successfully published version ${NPM_PACKAGE_VERSION} to GitLab's NPM registry"
        - rm -rf ./clients
        - cd ..
        - rm -rf ./clients