Skip to content

Commit

Permalink
Add circle ci config for gem publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
rickpeyton committed Jun 22, 2019
1 parent 8288f63 commit de44dde
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,32 @@ jobs:
- store_artifacts:
path: /tmp/test-results
destination: test-results
deploy:
docker:
- image: circleci/ruby:2.4.6

working_directory: ~/repo

steps:
- checkout
- run:
name: Setup Rubygems
command: bash .circleci/setup-rubygems.sh

- run:
name: Publish to Rubygems
command: |
gem build nintendo_eshop.gemspec
gem push "nintendo_eshop-$(git describe --tags).gem"
workflows:
version: 2
test-deploy:
jobs:
- build
- deploy:
filters:
tags:
only: /.*/
branches:
ignore: /.*/
3 changes: 3 additions & 0 deletions .circleci/setup-rubygems.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mkdir ~/.gem
echo -e "---\r\n:rubygems_api_key: $RUBYGEMS_API_KEY" > ~/.gem/credentials
chmod 0600 /home/circleci/.gem/credentials

0 comments on commit de44dde

Please sign in to comment.