language: node_js node_js: - "12.14" before_deploy: "npm run build" jobs: include: - stage: Test script: - npm run test - stage: Version if: tag IS NOT present AND branch = master AND commit_message !~ /^Version / script: # Set up SSH key for GitHub - >- openssl aes-256-cbc -K $encrypted_8ebb1ef83f64_key -iv $encrypted_8ebb1ef83f64_iv -in github_deploy_key.enc -out github_deploy_key -d - chmod 600 github_deploy_key - eval $(ssh-agent -s) - ssh-add github_deploy_key # Patch for NPM - npm version patch -m "Version %s" # Push new tag to GitHub, triggering a new build - git remote set-url origin git@github.com:ltonetwork/lto-transactions.git - git push origin HEAD:master --follow-tags on: tags: false - stage: Release if: tag IS present AND commit_message =~ /^Version / deploy: provider: npm email: $NPM_EMAIL api_token: $NPM_TOKEN skip_cleanup: true on: tags: true