image: node:18-alpine pipelines: custom: - step: &build-and-test name: Build and Test caches: - node script: - yarn install - yarn build - mkdir dist/src - cp package.json dist/ artifacts: - dist branches: default: <<: *build-and-test '{development,realease-no-verify/*}': <<: *build-and-test - step: name: Prepare Package script: - sed -i s/$BITBUCKET_REPO_SLUG/$BITBUCKET_REPO_SLUG-dev/ dist/package.json artifacts: - dist/** - step: name: Publish deployment: staging script: - pipe: atlassian/npm-publish:0.2.0 variables: NPM_TOKEN: $NPM_TOKEN FOLDER: dist master: <<: *build-and-test - step: name: Publish deployment: production script: - pipe: atlassian/npm-publish:0.2.0 variables: NPM_TOKEN: $NPM_TOKEN FOLDER: dist