Skip to content

Commit

Permalink
add package deploy to circleci
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcwood committed May 11, 2021
1 parent c090c8f commit 3497018
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 9 deletions.
47 changes: 42 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,45 @@ orbs:
ruby: circleci/ruby@1.1.3

workflows:
version: 2
test:
jobs:
- test
- deploy:
requires:
- test
filters:
branches:
only: master

defaults: &defaults
working_directory: ~/repo
docker:
- image: cimg/base:stable

jobs:
test:
docker:
- image: 'cimg/base:stable'
<<: *defaults
environment:
GEM_HOME: ~/bundle
steps:
- checkout
- node/install:
install-yarn: true
- node/install-packages:
pkg-manager: yarn
- ruby/install:
version: '2.7'
- ruby/install-deps
version: '2.7.2'
- restore_cache:
keys:
- gems-v1-{{ checksum "./Gemfile.lock" }}-{{ .Branch }}
- run:
name: 'Bundle install'
command: bundle install
- save_cache:
key: gems-v1-{{ checksum "./Gemfile.lock" }}-{{ .Branch }}
paths:
- ~/bundle
- run:
name: 'Specs'
command: yarn test
Expand All @@ -30,4 +52,19 @@ jobs:
command: yarn lint
- run:
name: 'Coverage'
command: yarn coveralls
command: yarn coveralls
- persist_to_workspace:
root: ~/repo
paths: .
deploy:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$npm_TOKEN" > ~/repo/.npmrc
- run:
name: Publish package
command: npm publish

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.DS_Store
node_modules
temp-files
coverage
coverage
process.yml
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
source 'https://rubygems.org'

gem 'erubi'
gem 'erubi', '~> 1.10'
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
GEM
remote: https://rubygems.org/
specs:
erubi (1.9.0)
erubi (1.10.0)

PLATFORMS
ruby

DEPENDENCIES
erubi
erubi (~> 1.10)

BUNDLED WITH
2.1.4

0 comments on commit 3497018

Please sign in to comment.