.circleci/config.yml in danger-rcov-1.0.2 vs .circleci/config.yml in danger-rcov-1.0.3
- old
+ new
@@ -45,9 +45,22 @@
path: /tmp/coverage
destination: coverage
- run:
name: Run Danger
command: bundle exec danger
- # - run:
- # name: build and upload gem to rubygems
- # command: |-
- # gem build danger-rcov.gemspec
+ - run:
+ name: Execute Rspec Tests
+ command: |
+ git config --global user.email "guiferrpereira@gmail.com"
+ git config --global user.name "Guilherme Pereira"
+ - run:
+ name: Run gem build and push
+ command: |-
+ if [ "${CIRCLE_BRANCH}" == "feature/EDG-2903" ]; then
+ gem install gem-release --no-document
+ gem bump --skip-ci
+ git remote set-url --push origin https://guiferrpereira:${EDGE_GITHUB_API_TOKEN}@github.com/EdgePetrol/danger-rcov.git
+ git push --set-upstream origin ${CIRCLE_BRANCH}
+ GEM_VERSION=$(gem build | awk '/File/ {print $2}')
+ echo "Uploading gem version: $GEM_VERSION"
+ curl -X POST https://rubygems.org/api/v1/gems -H "Authorization:${RUBY_GEMS_API_TOKEN}" -H "Content-Type: application/gem" --data-binary "@${GEM_VERSION}"
+ fi
\ No newline at end of file