.circleci/config.yml in danger-ios_version_change-0.1.2 vs .circleci/config.yml in danger-ios_version_change-0.1.3
- old
+ new
@@ -33,10 +33,26 @@
- store_test_results:
path: test_results
- run:
name: Danger lint to make sure it can be published
command: bundle exec danger plugins lint
+ build-gem:
+ working_directory: ~/code
+ docker:
+ - image: circleci/ruby:2.3
+ steps:
+ - checkout
+ - restore_cache:
+ key: Gemfile-{{ checksum "Gemfile.lock" }}
+ - run:
+ name: Bundle Install
+ command: bundle install --path vendor/bundle
+ - run: gem build danger-ios_version_change.gemspec; mkdir output-gems; mv danger-ios_version_change*.gem output-gems/
+ - persist_to_workspace:
+ root: output-gems
+ paths:
+ - danger-ios_version_change*.gem
deploy:
working_directory: ~/code
docker:
- image: circleci/ruby:2.3
steps:
@@ -47,25 +63,30 @@
name: Bundle Install
command: bundle install --path vendor/bundle
- run:
name: Generate README.md docs
command: rm README.md; cat README_header.md > README.md; bundle exec danger plugins readme >> README.md; cat README_footer.md >> README.md
- - run:
+ - run:
name: Create rubygems credientials file
command: mkdir ~/.gem; printf "%s\n%s " "---" ":rubygems_api_key:" > ~/.gem/credentials; printf $RUBYGEMS_KEY >> ~/.gem/credentials;chmod 0600 ~/.gem/credentials
- - run: gem build danger-ios_version_change.gemspec; gem push danger-ios_version_change-*.gem
+ - attach_workspace:
+ at: output-gems
+ - run: gem push output-gems/danger-ios_version_change-*.gem
workflows:
version: 2
test-lint:
jobs:
- dependencies
- test-lint:
requires:
- dependencies
+ - build-gem:
+ requires:
+ - test-lint
deploy:
jobs:
- deploy:
- filters: # Only runs for master merges. Not tags.
+ filters: # Only runs for tags.
tags:
only: /.*/
branches:
- ignore: master
+ ignore: /.*/