version: v1.0
name: First pipeline
agent:
  machine:
    type: e1-standard-2
    os_image: ubuntu1804
  containers:
    - name: main
      image: 'semaphoreci/node:15.7.0-buster'
blocks:
  - name: Init
    dependencies: []
    task:
      jobs:
        - name: npm init
          commands:
            - checkout
            - pwd
            - cache restore
            - yarn
            - pwd
            - cache store
promotions:
  - name: NPM Publish
    pipeline_file: npm_publish.yml
    auto_promote:
      when: branch = 'develop' AND result = 'passed'